:root { --pumpco-navy: #101923; --pumpco-navy-light: #17314c; --pumpco-yellow: #dcb426; --pumpco-yellow-bright: #f2c400; --topbar-height: calc(62px + env(safe-area-inset-top)); --bottom-nav-height: calc(66px + env(safe-area-inset-bottom)); color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #1e293b; background: #f1f5f9; }

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; background: #f1f5f9; }

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(249, 115, 22, .35); outline-offset: 2px; }

.application { min-height: 100vh; padding-bottom: calc(var(--bottom-nav-height) + 16px); }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; gap: 9px; align-items: center; padding: max(10px, env(safe-area-inset-top)) 12px 10px; border-bottom: 4px solid var(--pumpco-yellow); background: var(--pumpco-navy); box-shadow: 0 2px 10px rgba(15, 23, 42, .35); }

.icon-button, .outline-button { border: 0; border-radius: 10px; font-weight: 700; }

.icon-button { width: 42px; height: 42px; color: white; background: #1e293b; font-size: 1.4rem; }

.search { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; padding: 0 10px; border: 1px solid #475569; border-radius: 10px; color: #cbd5e1; background: #1e293b; }
.topbar .search { position: relative; }
.map-search-results { position: absolute; top: calc(100% + 9px); left: 0; right: 0; z-index: 80; max-height: min(420px, 62vh); overflow-y: auto; padding: 6px; border: 1px solid rgba(148,163,184,.35); border-radius: 13px; background: rgba(8,17,30,.98); box-shadow: 0 16px 38px rgba(2,6,23,.48); backdrop-filter: blur(12px); }
.map-search-results[hidden] { display: none !important; }
.map-search-results button { display: grid; width: 100%; gap: 2px; padding: 10px 12px; border: 0; border-radius: 9px; color: #f8fafc; background: transparent; text-align: left; cursor: pointer; }
.map-search-results button:hover, .map-search-results button:focus-visible { color: #081525; background: #facc15; outline: none; }
.map-search-results strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.map-search-results small { color: #94a3b8; font-size: .7rem; }
.map-search-results button:hover small, .map-search-results button:focus-visible small { color: #334155; }
.map-search-results p { margin: 0; padding: 12px; color: #94a3b8; font-size: .78rem; text-align: center; }

.search input { width: 100%; min-width: 0; height: 42px; border: 0; outline: 0; color: white; background: transparent; }

.search input::placeholder { color: #94a3b8; }

.connection-status { display: none; }

.qaqc-top-navigator { display: flex; width: 100%; overflow-x: auto; border: 1px solid #dbe3ee; border-radius: 8px; background: white; scrollbar-width: thin; }

.qaqc-top-navigator[hidden] { display: none; }

.qaqc-top-navigator .qaqc-tab { display: inline-flex; flex: 1 0 max-content; gap: 10px; align-items: center; justify-content: center; min-height: 64px; padding: 12px 22px; border: 0; border-right: 1px solid #edf2f7; border-radius: 0; color: #061d3a; background: white; font-size: .95rem; font-weight: 700; white-space: nowrap; transition: background .15s, color .15s; }

.qaqc-top-navigator .qaqc-tab:last-child { border-right: 0; }

.qaqc-top-navigator .qaqc-tab svg { width: 22px; height: 22px; fill: none; stroke: #52677f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.qaqc-top-navigator .qaqc-tab:hover { background: #fffdf4; }

.qaqc-top-navigator .qaqc-tab.active { color: #061d3a; background: white; box-shadow: inset 0 -5px 0 #f2c400; }

.qaqc-top-navigator .qaqc-tab:focus-visible { position: relative; z-index: 1; outline: 2px solid #113b67; outline-offset: -4px; }

.qaqc-top-navigator .qaqc-tab.active svg { stroke: #061d3a; }

.view { width: min(860px, 100%); margin: 0 auto; padding: 24px 16px; }

.view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }

.eyebrow { margin: 0 0 5px; color: #f97316; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }

h1 { margin: 0; color: #0f172a; font-size: clamp(1.65rem, 7vw, 2.2rem); }

.view-heading p:not(.eyebrow), .settings-card p { margin: 7px 0 0; color: #64748b; line-height: 1.45; }

.outline-button { min-height: 42px; padding: 0 13px; color: var(--pumpco-navy); border: 1px solid var(--pumpco-yellow); background: white; }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.metrics article, .settings-card, form { padding: 16px; border: 1px solid #e2e8f0; border-radius: 14px; background: white; box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }

.metrics strong { display: block; color: var(--pumpco-navy); font-size: 1.7rem; }

.metrics span { color: #64748b; font-size: .78rem; font-weight: 700; }

.message { min-height: 1.4em; margin: 14px 0; font-size: .9rem; }

.message.success { color: #15803d; }

.message.error { color: #b91c1c; }

form { display: grid; gap: 14px; }

label[hidden] { display: none; }

label { display: grid; gap: 6px; color: #334155; font-size: .78rem; font-weight: 800; letter-spacing: .03em; }

input, select, textarea { width: 100%; min-height: 47px; padding: 10px 11px; border: 1px solid #cbd5e1; border-radius: 9px; color: #0f172a; background: white; }

textarea { min-height: 116px; resize: vertical; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.form-grid[hidden] { display: none; }

.primary-button { min-height: 50px; border: 0; border-radius: 10px; color: white; background: var(--pumpco-navy); font-weight: 900; letter-spacing: .04em; }

.map-panel { position: relative; min-height: 470px; overflow: hidden; border-radius: 15px; background: var(--pumpco-navy); }

#field-map { position: absolute; inset: 0; }

#field-map.map-unavailable { display: grid; place-items: center; padding: 32px; color: #f8fafc; background: radial-gradient(circle at top, #244563, var(--pumpco-navy)); text-align: center; font-weight: 800; line-height: 1.45; }

.map-style-control, .map-legend { position: absolute; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px; background: rgba(16, 25, 35, .92); box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }

.map-style-control { top: 12px; left: 12px; }

.map-style-sep { width: 1px; height: 20px; margin: 0 2px; background: rgba(255, 255, 255, .18); }

.map-kmz-rev { padding: 0 4px 0 6px; color: #f8fafc; font-size: .72rem; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }

.map-kmz-download-btn { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px; color: var(--pumpco-yellow); background: rgba(255, 255, 255, .06); cursor: pointer; text-decoration: none; transition: background .15s ease, color .15s ease; }

.map-kmz-download-btn:disabled { opacity: .55; cursor: wait; }

.map-kmz-download-btn:hover, .map-kmz-download-btn:focus-visible { color: var(--pumpco-navy); background: var(--pumpco-yellow); outline: none; }

.map-kmz-download-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

.map-task-control { position: absolute; top: 60px; left: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px; color: white; background: rgba(16, 25, 35, .92); box-shadow: 0 4px 12px rgba(0, 0, 0, .22); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }

.map-task-control select { width: auto; min-height: 34px; padding: 5px 30px 5px 10px; border: 0; border-radius: 6px; font-size: .85rem; font-weight: 700; text-transform: none; }

#map-progress-summary { color: #0f172a; font-weight: 700; }

#map-progress-summary:empty { display: none; }

.map-style { min-height: 33px; padding: 0 10px; border: 0; border-radius: 6px; color: #d9e2ee; background: transparent; font-size: .73rem; font-weight: 800; }

.map-style.active { color: var(--pumpco-navy); background: var(--pumpco-yellow); }

.map-legend { top: 76px; right: 12px; color: white; font-size: .7rem; font-weight: 700; }

.map-legend span { display: inline-flex; align-items: center; gap: 5px; }

.map-legend i { display: inline-block; width: 13px; height: 4px; border-radius: 99px; }

/* Selector común de capas: botón de tres líneas y panel flotante en todos los mapas GIS. */
.map-layers-toggle {
  position: absolute;
  top: 90px;
  right: 12px;
  z-index: 18;
  display: inline-flex;
  width: auto;
  min-width: 82px;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(12, 18, 29, .94);
  box-shadow: 0 10px 24px rgba(2, 6, 23, .4);
  cursor: pointer;
  backdrop-filter: blur(9px);
}
.map-layers-toggle span { font-size: .82rem; font-weight: 850; }

.map-layers-toggle:hover, .map-layers-toggle:focus-visible, .map-layers-toggle.is-active {
  color: var(--pumpco-navy);
  background: var(--pumpco-yellow-bright);
  outline: none;
}

.map-layers-toggle svg, .map-layers-close svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

#view-map .map-gps-fab-group .map-layers-toggle {
  position: static;
  order: -2;
  flex: 0 0 auto;
}

.map-trace-return {
  position: absolute;
  right: 12px;
  bottom: 24px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(250, 204, 21, .65);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(12, 18, 29, .94);
  box-shadow: 0 8px 20px rgba(2, 6, 23, .4);
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
  backdrop-filter: blur(9px);
}
.map-trace-return:hover, .map-trace-return:focus-visible { color: #081525; background: #facc15; outline: none; }
.map-trace-return svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#view-map .map-gps-fab-group .map-trace-return { position: static; order: -1; }

.map-layers-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  width: min(390px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 20px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  color: #f8fafc;
  background: rgba(14, 15, 22, .96);
  box-shadow: 0 20px 48px rgba(2, 6, 23, .58);
  backdrop-filter: blur(14px);
}

.map-layers-panel[hidden] { display: none !important; }
.map-layers-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(148, 163, 184, .24); }
.map-layers-header h2 { margin: 2px 0 0; color: #f8fafc; font-size: 1.2rem; letter-spacing: .02em; }
.map-layers-eyebrow { color: #f2c400; font-size: .67rem; font-weight: 900; letter-spacing: .14em; }
.map-layers-close { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 12px; color: #f8fafc; background: rgba(71, 47, 57, .72); cursor: pointer; }
.map-layers-close:hover, .map-layers-close:focus-visible { background: #be185d; outline: 2px solid #f9a8d4; outline-offset: 2px; }
.map-layers-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 0 4px; }
.map-layers-actions button { min-height: 38px; padding: 0 16px; border: 1px solid rgba(244, 114, 182, .4); border-radius: 10px; color: #f8fafc; background: rgba(80, 40, 57, .45); font-size: .75rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.map-layers-actions button:first-child { border-color: rgba(52, 211, 153, .55); background: rgba(6, 95, 70, .55); }
.map-layers-actions button:hover, .map-layers-actions button:focus-visible { border-color: #f2c400; outline: none; }
.map-layers-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 16px; padding: 4px; border-radius: 12px; background: rgba(30, 41, 59, .75); }
.map-layers-tabs[hidden] { display: none !important; }
.map-layers-tabs button { min-height: 40px; padding: 7px 10px; border: 0; border-radius: 9px; color: #cbd5e1; background: transparent; font-size: .78rem; font-weight: 850; cursor: pointer; }
.map-layers-tabs button[aria-selected="true"] { color: #081525; background: #facc15; }
.map-layers-group { padding-top: 14px; }
.map-layers-group + .map-layers-group { margin-top: 10px; border-top: 1px solid rgba(148, 163, 184, .2); }
.map-layers-group h3 { margin: 0 0 8px; color: #cbd5e1; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.map-layer-group-toggle { display: flex; align-items: center; gap: 9px; min-height: 38px; margin: 0 0 8px; padding: 4px 6px; border-radius: 9px; color: #cbd5e1; font-size: .75rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.map-layer-group-toggle:hover { color: #f8fafc; background: rgba(255,255,255,.06); }
.map-layer-group-toggle input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: #db2777; cursor: pointer; }
.map-layers-list { display: grid; gap: 3px; }
.map-layer-item { display: grid; grid-template-columns: 24px 21px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 7px 6px; border-radius: 10px; color: #f1f5f9; font-size: .87rem; font-weight: 650; letter-spacing: 0; cursor: pointer; }
.map-layer-item:hover { background: rgba(255, 255, 255, .06); }
.map-layer-item[hidden] { display: none !important; }
.map-layer-item input { width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: #db2777; cursor: pointer; }
.map-layer-swatch { display: block; width: 21px; height: 8px; border-radius: 3px; background: var(--map-layer-color); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4); }
.map-layer-swatch.is-point { width: 15px; height: 15px; margin-left: 3px; border: 2px solid #f8fafc; border-radius: 50%; }
.map-layer-swatch.is-interference { height: 14px; border-radius: 0; background: linear-gradient(var(--map-layer-color), var(--map-layer-color)) center / 100% 2px no-repeat, repeating-linear-gradient(90deg, var(--map-layer-color) 0 2px, transparent 2px 5px); box-shadow: none; }
.map-layer-swatch.is-area-surveyed { height: 14px; border: 1px solid #cffafe; border-radius: 2px; background: rgba(34, 211, 238, .7); box-shadow: none; }
.map-layer-swatch.is-area-special { height: 14px; border: 1px solid #d1d5db; border-radius: 2px; background: rgba(156, 163, 175, .6); box-shadow: none; }
.map-layer-swatch.is-camp { height: 14px; border: 2px solid #62d5b4; border-radius: 2px; background: rgba(98, 213, 180, .4); box-shadow: none; }
.map-layer-swatch.is-gate { position: relative; width: 16px; height: 16px; margin-left: 2px; border: 2px solid #fff7d6; border-radius: 50%; background: var(--map-layer-color); box-shadow: none; }
.map-layer-swatch.is-gate { background: conic-gradient(#15803d 0 33%, #b45309 0 66%, #b91c1c 0); }
.map-layer-swatch.is-gate::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #ffffff; }
.map-layer-swatch.is-road { height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--map-layer-color) 0 5px, transparent 5px 8px); box-shadow: none; }
.map-layer-swatch.is-national-route { height: 7px; border: 1px solid #111827; background: repeating-linear-gradient(90deg, var(--map-layer-color) 0 5px, transparent 5px 8px); box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.map-layer-swatch.is-provincial-route { height: 6px; border: 1px solid #111827; background: repeating-linear-gradient(90deg, var(--map-layer-color) 0 5px, transparent 5px 8px); }
.map-layer-swatch.is-rural-road { height: 4px; background: repeating-linear-gradient(90deg, var(--map-layer-color) 0 6px, transparent 6px 9px); box-shadow: none; }
.map-layer-swatch.is-water { height: 5px; border-radius: 3px; background: var(--map-layer-color); box-shadow: 0 0 0 1px #111827; }
.map-layer-swatch.is-right-of-way { height: 14px; border: 1px dashed #fde68a; border-radius: 2px; background: color-mix(in srgb, var(--map-layer-color) 22%, transparent); box-shadow: none; }
.map-layer-swatch.is-bridge { position: relative; width: 17px; height: 11px; margin-left: 2px; border: 2px solid #f8fafc; border-radius: 8px 8px 2px 2px; background: var(--map-layer-color); }
.map-layer-swatch.is-fence { height: 12px; border-radius: 0; background: linear-gradient(var(--map-layer-color), var(--map-layer-color)) center / 100% 2px no-repeat, repeating-linear-gradient(90deg, transparent 0 3px, var(--map-layer-color) 3px 5px, transparent 5px 8px); box-shadow: none; }
.map-layer-swatch.is-calicata { width: 15px; height: 15px; margin-left: 3px; border: 2px solid #f8fafc; border-radius: 50%; background: var(--map-layer-color); }
.map-layer-swatch.is-bh1, .map-layer-swatch.is-bh2, .map-layer-swatch.is-resistivity { position: relative; width: 15px; height: 15px; margin-left: 3px; border: 2px solid #f8fafc; border-radius: 2px; background: var(--map-layer-color); transform: rotate(45deg); }
.map-layer-swatch.is-bh1::after { content: ""; position: absolute; top: 1px; bottom: 1px; left: 50%; width: 2px; background: #fff; transform: translateX(-50%); }
.map-layer-swatch.is-bh2 { background: var(--map-layer-color); border-color: #f8fafc; box-shadow: none; }
.map-layer-swatch.is-resistivity { border-radius: 3px; transform: none; }
.map-layer-swatch.is-resistivity::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fff; }
.map-layer-label { min-width: 0; line-height: 1.25; }
.map-layer-label small { display: block; margin-top: 2px; color: #94a3b8; font-size: .7rem; font-weight: 600; }
.map-layer-count { min-width: 24px; color: #94a3b8; font-size: .75rem; font-variant-numeric: tabular-nums; text-align: right; }

.map-feature-tooltip {
  position: absolute;
  z-index: 29;
  display: grid;
  width: min(280px, calc(100% - 20px));
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(148, 163, 184, .5);
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(9, 16, 28, .96);
  box-shadow: 0 12px 30px rgba(2, 6, 23, .48);
  font-size: .78rem;
  line-height: 1.35;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}
.map-feature-tooltip[hidden] { display: none !important; }
.map-feature-tooltip strong { color: #facc15; font-size: .88rem; }
.map-feature-tooltip b { color: #f8fafc; }
.map-feature-tooltip .map-feature-tasks { padding-bottom: 6px; border-bottom: 1px solid rgba(148, 163, 184, .22); }
.map-feature-tooltip button { justify-self: start; margin-top: 3px; padding: 6px 10px; border: 1px solid rgba(250, 204, 21, .6); border-radius: 8px; color: #facc15; background: rgba(15, 23, 42, .9); font: inherit; font-weight: 800; cursor: pointer; }
.map-feature-tooltip button:hover, .map-feature-tooltip button:focus-visible { color: #081525; background: #facc15; outline: none; }

@media (max-width: 680px) {
  .map-layers-toggle { top: 82px; right: 10px; min-width: 82px; height: 52px; }
  .map-layers-panel { inset: 10px; width: auto; max-height: none; padding: 18px 16px; border-radius: 16px; }
  .map-layer-item { min-height: 50px; font-size: .9rem; }
  .map-trace-return { right: 10px; bottom: 16px; min-height: 44px; padding: 9px 12px; }
}

.legend-pipeline-24 { background: #3da5ff; box-shadow: 0 0 5px #1d6fd6; }

.legend-pipeline-48 { background: #ffcf4a; box-shadow: 0 0 5px #ff9800; }

.legend-progress { background: #ffffff; box-shadow: 0 0 7px #ffffff; }

.map-report-line { display: block; margin-top: 6px; }

.legend-report { width: 10px !important; height: 10px !important; border: 2px solid #061d3a; border-radius: 50% !important; background: #f97316; }

.legend-camp { height: 10px !important; border: 2px solid #62d5b4; border-radius: 2px !important; background: rgba(98, 213, 180, .4); }

.map-copy { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: min(330px, calc(100% - 24px)); padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .94); box-shadow: 0 4px 12px rgba(15, 23, 42, .13); }

.map-copy strong, .map-copy span { display: block; }

.map-copy span { margin-top: 3px; color: #64748b; font-size: .82rem; }

.settings-card { margin-bottom: 15px; }

.report-filters { grid-template-columns: minmax(180px, 1fr) 150px 150px auto; align-items: end; margin-bottom: 14px; }

.report-filters .primary-button { min-height: 47px; }

.data-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 14px; background: white; }

.data-table { width: 100%; min-width: 690px; border-collapse: collapse; font-size: .83rem; }

.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: middle; }

.data-table th { color: #475569; background: #f8fafc; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table tbody tr:hover { background: #fffdf2; }

.planning-analysis { display: grid; gap: 18px; margin: 18px 0; }

.planning-costs { display: grid; gap: 14px; margin: 18px 0; }

.conversion-progress { display: grid; gap: 8px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; }

.conversion-progress > div { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; }

.conversion-progress span { color: #64748b; font-weight: 700; }

.conversion-progress i { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }

.conversion-progress b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--pumpco-yellow); transition: width .2s ease; }

.conversion-progress p { margin: 0; color: #475569; font-size: .78rem; }

.conversion-progress a { color: #0f4c81; font-weight: 800; }

.planning-cost-import { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: white; font-size: .82rem; }

.planning-cost-import strong { color: var(--pumpco-navy); }

.allocation-form { display: grid; grid-template-columns: minmax(170px, 1fr) 110px auto; gap: 6px; min-width: 390px; }

.allocation-form input { min-height: 35px; padding: 6px 8px; font-size: .76rem; }

.allocation-form button { min-height: 35px; padding: 0 9px; font-size: .72rem; }

.planning-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.planning-section-heading h2, .planning-analysis h2 { margin: 0; color: var(--pumpco-navy); font-size: 1.05rem; }

.planning-section-heading p { margin: 5px 0 0; color: #64748b; font-size: .82rem; line-height: 1.4; }

.curve-wrap, .gantt-wrap { overflow-x: auto; padding: 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: white; }

#planning-curve { display: block; min-width: 620px; width: 100%; height: auto; }

.tilos-wrap { overflow-x: auto; padding: 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: white; }

#tilos-chart { display: block; min-width: 720px; width: 100%; height: auto; }

.tilos-grid { stroke: #e2e8f0; stroke-width: 1; }

.tilos-axis { stroke: #64748b; stroke-width: 1.5; }

.tilos-plan { stroke: #1d6fd6; stroke-width: 5; stroke-linecap: round; }

.tilos-actual { stroke: #ef4444; stroke-width: 5; stroke-linecap: round; }

#tilos-chart text { fill: #475569; font-size: 12px; }

#tilos-chart .tilos-label { font-size: 11px; }

.curve-legend { display: flex; gap: 10px; font-size: .74rem; font-weight: 800; }

.curve-legend span::before { display: inline-block; width: 10px; height: 3px; margin-right: 4px; content: ""; vertical-align: middle; }

.curve-legend .pv::before { background: #3b82f6; }.curve-legend .ev::before { background: #16a34a; }.curve-legend .ac::before { background: #f97316; }

.gantt { min-width: 680px; }

.gantt-row { display: grid; grid-template-columns: 280px 1fr; gap: 10px; align-items: center; min-height: 35px; border-bottom: 1px solid #f1f5f9; font-size: .75rem; }

.gantt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; font-weight: 700; }

.gantt-track { position: relative; height: 14px; overflow: hidden; border-radius: 5px; background: #e2e8f0; }

.gantt-bar { position: absolute; top: 0; height: 100%; border-radius: inherit; background: #dc2626; }

@media (max-width: 620px) { .planning-section-heading { display: grid; }.curve-legend { margin-top: 4px; } }

.priority-badge { display: inline-block; padding: 4px 7px; border-radius: 999px; color: #334155; background: #e2e8f0; font-size: .7rem; font-weight: 800; }

.priority-badge.high { color: #9a3412; background: #ffedd5; }

.priority-badge.critical { color: #991b1b; background: #fee2e2; }

.table-action { min-height: 32px; padding: 0 9px; border: 1px solid var(--pumpco-yellow); border-radius: 7px; color: var(--pumpco-navy); background: white; font-size: .75rem; font-weight: 800; }

.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: #64748b; font-size: .82rem; }

.table-pagination div { display: flex; gap: 8px; }

.table-pagination .outline-button { min-height: 36px; }

.table-pagination button:disabled { cursor: not-allowed; opacity: .45; }

.report-dialog { width: min(680px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 20px 55px rgba(15, 23, 42, .45); }

.report-dialog::backdrop { background: rgba(15, 23, 42, .7); }

/* Ventanas dentro del área segura: en el celular no quedan debajo de la barra de estado ni de los botones del
   teléfono (APK de borde a borde) ni de la barra del navegador. */
.report-dialog:modal {
  top: env(safe-area-inset-top, 0px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--browser-bottom-offset, 0px));
  max-height: min(760px, calc(100dvh - 28px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - var(--browser-bottom-offset, 0px)));
}

.report-dialog article { padding: 20px; }

.report-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.report-dialog h2 { margin: 0; color: var(--pumpco-navy); font-size: 1.25rem; }

.report-dialog .icon-button { width: 36px; height: 36px; font-size: 1.25rem; }

.report-detail { display: grid; grid-template-columns: 145px 1fr; gap: 0; margin: 18px 0; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }

.report-detail dt, .report-detail dd { min-height: 38px; margin: 0; padding: 9px 10px; border-bottom: 1px solid #e2e8f0; font-size: .85rem; }

.report-detail dt { color: #475569; background: #f8fafc; font-weight: 800; }

.report-detail dd { color: #0f172a; overflow-wrap: anywhere; }

.report-detail dt:nth-last-of-type(1), .report-detail dd:last-child { border-bottom: 0; }

.report-evidence { margin: 0 0 18px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }

.report-evidence img { display: block; width: 100%; max-height: 60vh; object-fit: contain; }

.personnel-form { padding: 0; border: 0; border-radius: 0; box-shadow: none; }

.status-badge { display: inline-block; padding: 4px 7px; border-radius: 999px; color: #166534; background: #dcfce7; font-size: .7rem; font-weight: 800; }

.status-badge.suspended { color: #9a3412; background: #ffedd5; }

.status-badge.deactivated { color: #991b1b; background: #fee2e2; }

.activity-resource-list { display: grid; gap: 9px; margin-top: 15px; }

.activity-resource-list section { padding: 11px; border: 1px solid #e2e8f0; border-radius: 9px; }

.activity-resource-list h3 { margin: 0 0 7px; color: var(--pumpco-navy); font-size: .85rem; }

.activity-resource-list ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; color: #475569; font-size: .82rem; }

.settings-card code { font-weight: 800; }

.saved-api-base { margin: -4px 0 15px; color: #475569; font-size: .82rem; overflow-wrap: anywhere; }

.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; display: flex; height: var(--bottom-nav-height); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #e2e8f0; background: white; box-shadow: 0 -4px 12px rgba(15, 23, 42, .06); }

.tab { flex: 1; border: 0; color: #64748b; background: white; font-size: .75rem; font-weight: 800; }

.tab.active { color: var(--pumpco-navy); background: #fff9db; box-shadow: inset 0 -3px 0 var(--pumpco-yellow); }

.drawer-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .62); }

.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; display: flex; width: min(82vw, 290px); flex-direction: column; color: white; background: var(--pumpco-navy); box-shadow: 7px 0 25px rgba(15, 23, 42, .28); transform: translateX(-105%); transition: transform .25s ease; }

.drawer.open { transform: translateX(0); }

.brand { display: flex; align-items: center; height: calc(72px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 18px 0; border-bottom: 4px solid var(--pumpco-yellow); background: var(--pumpco-navy); }

.brand-logo { width: 186px; height: auto; object-fit: contain; }

.drawer-nav { display: grid; gap: 4px; padding: 18px 10px; }

.drawer-link { padding: 13px; border: 0; border-radius: 8px; color: #cbd5e1; background: transparent; text-align: left; font-weight: 700; }

.drawer-link.active, .drawer-link:hover { color: var(--pumpco-navy); background: var(--pumpco-yellow); }

.operator { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 16px; border-top: 1px solid #334155; }

.operator-avatar { display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid var(--pumpco-yellow); border-radius: 50%; font-size: .72rem; font-weight: 900; }

.operator strong, .operator small { display: block; }

.operator small { margin-top: 3px; color: #94a3b8; font-size: .72rem; }

#view-map { position: fixed; top: var(--topbar-height); right: 0; bottom: var(--bottom-nav-height); left: 0; z-index: 1; width: 100vw; max-width: none; margin: 0 !important; padding: 0 !important; border: 0; box-shadow: none; }

#view-map .view-heading { display: none; }

#view-map .map-panel { width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }

#view-map #field-map, #view-map .maplibregl-map, #view-map .maplibregl-canvas-container, #view-map .maplibregl-canvas { width: 100% !important; height: 100% !important; }

@media (min-width: 700px) { .connection-status { display: block; color: #bbf7d0; font-size: .7rem; font-weight: 800; } .connection-status.offline { color: #fed7aa; } }

@media (max-width: 680px) { .form-grid, .report-filters { grid-template-columns: minmax(0, 1fr); } .view { padding: 20px 13px; } .view-heading { display: block; } .view-heading .outline-button { margin-top: 12px; } .report-detail { grid-template-columns: 110px 1fr; } }



/* Sesión: la app solo se muestra con un usuario autenticado. */

body:not(.authenticated) > :not(#login-screen):not(#ota-update-banner):not(script) { display: none !important; }

body.authenticated > #login-screen { display: none; }

.operator { flex-wrap: wrap; }

.operator > div { flex: 1; min-width: 0; }

.operator small:empty { display: none; }

.logout-button { width: 100%; min-height: 38px; border: 1px solid #475569; border-radius: 8px; color: #e2e8f0; background: transparent; font-size: .8rem; font-weight: 800; }

.logout-button:hover { border-color: var(--pumpco-yellow); color: var(--pumpco-yellow); }



/* Login, basado en la pantalla de acceso de Pumpco Datafield. */

.auth-container { display: flex; width: 100%; min-height: 100vh; min-height: 100dvh; }

.auth-left { position: relative; width: 50%; overflow: hidden; background-color: var(--pumpco-navy); background-image:

  linear-gradient(90deg, rgba(4, 14, 26, .30), rgba(4, 14, 26, .04)),

  url("/assets/login-pipeline-bg.png"); background-position: center; background-repeat: no-repeat; background-size: cover; }

.auth-left::after { position: absolute; inset: 0; background:

  radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .04), transparent 26%),

  linear-gradient(180deg, rgba(2, 10, 20, .05), rgba(2, 10, 20, .16)); content: ""; pointer-events: none; }

.left-content { position: relative; z-index: 1; display: flex; height: 100%; flex-direction: column; padding: clamp(42px, 6vh, 70px) clamp(48px, 6vw, 92px); }

.logo-pumpco { width: clamp(240px, 24vw, 380px); max-width: 88%; height: auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .25)); }

.left-main { margin-top: clamp(62px, 12vh, 130px); }

.pce-title { display: block; color: var(--pumpco-yellow-bright); font-size: clamp(4.4rem, 7vw, 7.5rem); font-weight: 900; line-height: .9; letter-spacing: -.01em; text-transform: uppercase; text-shadow: 0 14px 30px rgba(0, 0, 0, .32); }

.pce-title::after { display: block; width: clamp(140px, 12vw, 200px); height: 5px; margin: 18px 0 26px; border-radius: 999px; background: linear-gradient(90deg, var(--pumpco-yellow-bright), #ffd35a); content: ""; }

.product-name { margin: 0; color: white; font-size: clamp(1.6rem, 2.1vw, 2.4rem); line-height: 1.18; }

.product-subtitle { margin: 14px 0 0; color: rgba(255, 255, 255, .82); font-size: clamp(1rem, 1.2vw, 1.3rem); line-height: 1.45; }

.auth-right { display: flex; width: 50%; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px); background:

  radial-gradient(circle at 88% 12%, rgba(242, 196, 0, .14), transparent 24%),

  radial-gradient(circle at 30% 85%, rgba(23, 49, 76, .13), transparent 28%),

  linear-gradient(135deg, #edf3f8 0%, #f8fafc 48%, #e5edf5 100%); }

.auth-card { width: 100%; max-width: 520px; padding: clamp(34px, 6vh, 54px) clamp(28px, 5vw, 60px); border: 1px solid rgba(255, 255, 255, .92); border-top: 5px solid var(--pumpco-yellow-bright); border-radius: 20px; background: rgba(255, 255, 255, .9); box-shadow: 0 30px 74px rgba(7, 28, 52, .18); text-align: center; }

.auth-card-logo { display: none; }

.auth-card h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); letter-spacing: -.04em; }

.auth-card .subtitle { margin: 8px 0 30px; color: #64748b; }

.login-form { display: grid; gap: 18px; padding: 0; border: 0; background: none; box-shadow: none; text-align: left; }

.login-form label { font-size: .88rem; letter-spacing: 0; }

.input-wrap { position: relative; display: block; }

.input-icon, .toggle-password svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.input-icon { position: absolute; top: 50%; left: 16px; color: #7b8794; transform: translateY(-50%); pointer-events: none; }

.login-form input { height: 52px; padding: 0 48px; border-color: #d4dce7; border-radius: 13px; font-size: .98rem; font-weight: 400; transition: border-color .18s, box-shadow .18s; }

.login-form input:focus { border-color: var(--pumpco-yellow-bright); outline: 0; box-shadow: 0 0 0 .22rem rgba(242, 196, 0, .2); }

.toggle-password { position: absolute; top: 50%; right: 10px; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; color: #7b8794; background: transparent; transform: translateY(-50%); }

.toggle-password:hover { color: var(--pumpco-navy-light); }

.toggle-password .eye-slash { display: none; }

.toggle-password.visible .eye-slash { display: inline; }

.login-form .message { margin: 0; }

.login-form .message:empty, .login-form label[hidden] { display: none; }

.login-form .message.error { padding: 12px 14px; border: 1px solid rgba(220, 38, 38, .18); border-radius: 12px; background: rgba(254, 226, 226, .78); color: #7f1d1d; }

.btn-login { height: 52px; border: 0; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--pumpco-navy), var(--pumpco-navy-light)); box-shadow: 0 15px 30px rgba(7, 28, 52, .25); font-weight: 800; transition: transform .18s, box-shadow .18s; }

.btn-login span { margin-left: 14px; }

.btn-login:hover:not(:disabled) { box-shadow: 0 19px 36px rgba(7, 28, 52, .3); transform: translateY(-1px); }

.btn-login:disabled { cursor: progress; opacity: .7; }

@media (max-width: 900px) {

  .auth-left { display: none; }

  .auth-right { width: 100%; align-items: flex-start; padding: 24px 16px; background: linear-gradient(180deg, var(--pumpco-navy) 0 250px, #f1f5f9 250px); }

  .auth-card { max-width: 440px; padding: 30px 22px; border-radius: 16px; background: white; }

  .auth-card-logo { display: block; width: 200px; margin: -96px auto 52px; }

  .auth-right { padding-top: calc(130px + env(safe-area-inset-top)); }

}



.form-type-fields { display: grid; gap: 14px; min-width: 0; margin: 0; padding: 0; border: 0; }

.form-type-fields[hidden] { display: none; }

.form-section-title { margin: 10px 0 0; padding: 8px 12px; border-left: 4px solid var(--pumpco-yellow); border-radius: 6px; color: white; background: var(--pumpco-navy); font-size: .82rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }

.form-type-note { margin: 0; color: #64748b; font-size: .82rem; line-height: 1.4; }

.report-detail .report-detail-section { grid-column: 1 / -1; color: white; background: var(--pumpco-navy); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }

.choice-group { display: grid; gap: 8px; }

.choice-group-label { color: #334155; font-size: .78rem; font-weight: 800; letter-spacing: .03em; }

.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid #d8e0ea; border-radius: 10px; background: white; font-size: .9rem; font-weight: 600; letter-spacing: 0; }

.choice input { width: 20px; min-height: 20px; height: 20px; margin: 0; accent-color: var(--pumpco-navy); }

.dynamic-rows { display: grid; gap: 10px; }

.dynamic-row { display: grid; gap: 10px; align-items: end; padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }

.resource-row { grid-template-columns: minmax(0, 1fr) 90px 110px 44px; }

.staff-row { grid-template-columns: minmax(0, 1fr) 44px; }

.dynamic-row .remove-row { width: 44px; height: 47px; border: 1px solid #fecaca; color: #b91c1c; background: white; font-size: 1.4rem; line-height: 1; }

.dynamic-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; color: #64748b; font-size: .82rem; font-weight: 700; }

@media (max-width: 680px) { .resource-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; } .resource-row label:first-child { grid-column: 1 / -1; } }

.photo-row { grid-template-columns: 88px minmax(0, 1fr) 90px 44px; }

.photo-pick { position: relative; display: grid; width: 88px; height: 70px; place-items: center; overflow: hidden; border: 1px dashed #94a3b8; border-radius: 9px; background: white; color: #475569; cursor: pointer; }

.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.photo-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.photo-preview:not([hidden]) + span { display: none; }

@media (max-width: 680px) { .photo-row { grid-template-columns: 88px minmax(0, 1fr) 44px; } .photo-pick { grid-row: span 2; align-self: stretch; height: auto; } .photo-row label:nth-child(3) { grid-column: 2; } }

.report-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px; }

.report-photos figure { margin: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }

.report-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.report-photos figcaption { padding: 6px 8px; color: #475569; font-size: .75rem; font-weight: 700; }

.signature-fieldset { display: grid; gap: 12px; margin: 0; padding: 14px; border: 1px solid #e2e8f0; border-left: 4px solid var(--pumpco-yellow); border-radius: 12px; background: #f8fafc; }

.signature-fieldset legend { padding: 0 6px; color: var(--pumpco-navy); font-weight: 900; }

.signature-fieldset p { margin: 0; color: #64748b; font-size: .82rem; line-height: 1.4; }

.signature-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; color: #475569; background: #e2e8f0; font-size: .72rem; font-weight: 800; white-space: nowrap; }

.signature-badge.sent { color: #854d0e; background: #fef3c7; }

.signature-badge.completed { color: #166534; background: #dcfce7; }

.signature-badge.declined, .signature-badge.voided, .signature-badge.error { color: #991b1b; background: #fee2e2; }

.signature-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.signature-actions[hidden], .signature-actions [hidden] { display: none; }



/* Sistema visual PCE para la consola de campo. */

:root { --pumpco-navy: #101923; --pumpco-navy-2: #0b1520; --pumpco-blue: #113b67; --pumpco-yellow: #dcb426; --pumpco-yellow-bright: #f2c400; --pumpco-bg: #f6f8fb; --pumpco-surface: #ffffff; --pumpco-text: #061d3a; --pumpco-muted: #5f6f85; --pumpco-border: #dbe3ee; --pumpco-border-soft: #edf2f7; --pce-radius: 18px; --topbar-height: calc(88px + env(safe-area-inset-top)); color: var(--pumpco-text); background: var(--pumpco-bg); }

body { background: var(--pumpco-bg); color: var(--pumpco-text); font-size: .96rem; line-height: 1.5; }

h1, h2, h3, h4, h5, h6 { color: var(--pumpco-text); font-weight: 800; letter-spacing: -.025em; }

.application { padding-bottom: calc(var(--bottom-nav-height) + 24px); }

.topbar { min-height: calc(72px + env(safe-area-inset-top)); gap: 16px; padding: max(10px, env(safe-area-inset-top)) 24px 10px; border-bottom: 4px solid var(--pumpco-yellow-bright); background: #0d1b28; box-shadow: none; }

.icon-button { width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; background: transparent; font-size: 1.2rem; }

.icon-button:hover { border-color: var(--pumpco-yellow); background: rgba(255, 255, 255, .08); }

.app-identity { display: flex; align-items: center; gap: 14px; min-width: 0; color: white; }

.app-identity img { width: 38px; height: 38px; object-fit: contain; }

.app-identity .app-divider { width: 1px; height: 32px; background: rgba(255, 255, 255, .26); }

.app-identity strong { color: var(--pumpco-yellow-bright); font-size: 1.75rem; font-weight: 900; letter-spacing: -.03em; }

.app-identity .app-product { color: rgba(255, 255, 255, .92); font-size: 1rem; font-weight: 700; white-space: nowrap; }

.topbar .search { max-width: 320px; margin-left: auto; padding: 0 10px; border-color: rgba(255, 255, 255, .18); border-radius: 6px; background: transparent; }

.topbar .search input { min-height: 36px; height: 36px; padding: 6px 0; font-size: .8rem; }

.topbar svg, .qaqc-heading-actions svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar .icon-button { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; }

.header-account { display: inline-grid; width: 40px; height: 40px; place-items: center; flex-shrink: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; color: #071624; background: var(--pumpco-yellow); font-size: .78rem; font-weight: 900; }

.header-avatar { display: grid; width: 100%; height: 100%; place-items: center; }

.header-account:hover { border-color: var(--pumpco-yellow-bright); background: rgba(255, 255, 255, .06); }

.topbar .connection-status { white-space: nowrap; font-size: .7rem; }

.search:focus-within { border-color: var(--pumpco-yellow); box-shadow: 0 0 0 3px rgba(220, 180, 38, .16); }

.view { width: min(1440px, 100%); padding: 40px max(24px, calc((100vw - 1360px) / 2)); }

#view-qaqc,

#view-planning:has([data-subpage-panel="ewr-tracker"]:not(.subpage-off)),

#view-planning:has([data-subpage-panel="em5-tracker"]:not(.subpage-off)),

#view-planning:has([data-subpage-panel="campaign"]:not(.subpage-off)),

#view-planning:has([data-subpage-panel="topo-campaign"]:not(.subpage-off)),

#view-validation { width: 100%; max-width: none; margin: 0; padding: 20px 16px; scroll-margin-top: calc(var(--topbar-height) + var(--qaqc-header-height, 140px)); }

/* Dashboard: usa todo el ancho disponible (en el celular conserva el margen de .view). */

@media (min-width: 681px) {

  #view-alerts { width: 100%; max-width: none; margin: 0; padding-right: 24px; padding-left: 24px; }

  body:has(#view-alerts:not([hidden])) .breadcrumb { padding-right: 24px; padding-left: 24px; }

}

body:has(#view-planning:not([hidden]) [data-subpage-panel="campaign"]:not(.subpage-off)) .breadcrumb,

body:has(#view-planning:not([hidden]) [data-subpage-panel="topo-campaign"]:not(.subpage-off)) .breadcrumb,

body:has(#view-validation:not([hidden])) .breadcrumb { padding-left: 16px; padding-right: 16px; }

.view-heading { gap: 32px; margin-bottom: 28px; }

.view-heading h1 { display: inline-block; font-size: clamp(2.15rem, 4vw, 3.5rem); line-height: 1; }

.view-heading h1::after { display: block; width: 100%; height: 5px; margin-top: 17px; border-radius: 999px; background: var(--pumpco-yellow-bright); content: ""; }

.eyebrow { color: #9b7500; font-size: .74rem; letter-spacing: .1em; }

.view-heading p:not(.eyebrow), .settings-card p { color: var(--pumpco-muted); font-size: 1rem; }

.metrics { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }

.metrics article, .settings-card, form { border-color: var(--pumpco-border-soft); border-radius: var(--pce-radius); box-shadow: 0 12px 34px rgba(7, 22, 36, .06); }

.metrics article { padding: 22px; }

.metrics strong { color: var(--pumpco-text); font-size: 2rem; }

.metrics span { color: var(--pumpco-muted); }

.outline-button, .table-action { border-color: #bdcad9; border-radius: 10px; color: var(--pumpco-blue); }

.outline-button:hover, .table-action:hover { border-color: var(--pumpco-blue); color: white; background: var(--pumpco-blue); }

.primary-button { border-radius: 10px; background: var(--pumpco-blue); box-shadow: 0 8px 18px rgba(17, 59, 103, .18); }

.primary-button:hover { background: #0f3157; }

#form-submit { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.form-actions #form-submit { flex: 1 1 260px; }

.form-actions #form-save-draft { flex: 0 1 auto; min-height: 50px; }

.form-draft-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 10px 14px; border: 1px solid #f5d76e; border-left: 4px solid var(--pumpco-yellow-bright); border-radius: 10px; background: #fffdf4; }

.form-draft-note[hidden], .my-queued[hidden], .my-rejected[hidden] { display: none; }

.my-rejected { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 10px; background: #fef2f2; }

.my-rejected p { margin: 0 0 8px; }

.my-rejected ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.my-rejected li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

.my-rejected small { color: #7f1d1d; overflow-wrap: anywhere; }

.my-reports-note { margin: 0 0 10px; color: var(--pumpco-muted); font-size: .9rem; }

.my-queued { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #f5d76e; border-radius: 10px; background: #fffdf4; }

@media (max-width: 560px) { .form-actions > button { flex: 1 1 100%; } }

#form-submit:disabled { cursor: progress; opacity: .85; }

.button-spinner { width: 18px; height: 18px; border: 3px solid rgba(255, 255, 255, .35); border-top-color: white; border-radius: 50%; animation: button-spin .8s linear infinite; }

.button-spinner[hidden] { display: none; }

@keyframes button-spin { to { transform: rotate(360deg); } }

input, select, textarea { border-color: #d8e0ea; border-radius: 10px; font-size: .95rem; }

input:focus, select:focus, textarea:focus { border-color: #9bb6d6; outline: 0; box-shadow: 0 0 0 .2rem rgba(17, 59, 103, .13); }

.data-table-wrap, .curve-wrap, .gantt-wrap, .tilos-wrap { border-color: var(--pumpco-border-soft); border-radius: var(--pce-radius); box-shadow: 0 12px 34px rgba(7, 22, 36, .045); }

.data-table th { padding: 15px 16px; color: var(--pumpco-muted); background: #fbfcfe; font-size: .76rem; }

.data-table td { padding: 15px 16px; border-color: #eef1f5; }

.data-table tbody tr:hover { background: #fffdf4; }

.planning-analysis { gap: 20px; margin: 26px 0; }

.planning-section-heading h2, .planning-analysis h2 { font-size: 1.22rem; }

.planning-section-heading p { color: var(--pumpco-muted); font-size: .9rem; }

.status-badge, .priority-badge { padding: 5px 10px; font-weight: 800; }

.report-dialog { border-radius: var(--pce-radius); box-shadow: 0 24px 60px rgba(7, 22, 36, .3); }

.drawer { width: min(82vw, 330px); background: var(--pumpco-navy-2); }

.brand { height: calc(88px + env(safe-area-inset-top)); border-bottom-width: 5px; }

.drawer-link { border-radius: 10px; }

.bottom-nav { border-color: var(--pumpco-border); box-shadow: 0 -4px 12px rgba(7, 22, 36, .06); }



@media (max-width: 900px) {

  .topbar { min-height: calc(64px + env(safe-area-inset-top)); gap: 10px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; }

  .app-identity .app-divider, .app-identity .app-product { display: none; }

  .app-identity { gap: 8px; }

  .app-identity img { width: 30px; height: 30px; }

  .app-identity strong { font-size: 1.35rem; }

  .topbar .connection-status { display: none; }

  .header-account { width: 36px; padding: 8px; }

  .topbar .search { flex: 1; }

  .qaqc-top-navigator .qaqc-tab { min-height: 52px; padding: 10px 16px; font-size: .85rem; }

  .view, #view-qaqc { padding: 28px 16px; }

  .view-heading h1 { font-size: clamp(2rem, 9vw, 2.7rem); }

}



/* Trazabilidad QA/QC */

.view[hidden], #view-qaqc [data-qaqc-panel][hidden], .qaqc-workspace-header[hidden] { display: none !important; }

.qaqc-workspace-header { position: sticky; top: var(--topbar-height); z-index: 19; padding: 12px 16px 16px; border-bottom: 1px solid var(--pumpco-border-soft); background: #fbfcfe; scroll-margin-top: var(--topbar-height); }

.qaqc-workspace-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }

.qaqc-workspace-heading h1 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.8rem); line-height: 1.2; }

.qaqc-module-label { padding: 3px 9px; border: 1px solid var(--pumpco-border); border-radius: 5px; color: #52677f; background: #f6f8fb; font-size: .75rem; font-weight: 700; }

#view-qaqc .planning-analysis, #view-planning .planning-analysis { min-width: 0; margin-top: 16px; padding: 24px; border: 1px solid var(--pumpco-border); border-radius: 12px; background: white; }

#view-qaqc .planning-section-heading, #view-planning .planning-section-heading { align-items: center; gap: 24px; }

#view-qaqc .planning-section-heading .primary-button, #view-planning .planning-section-heading .primary-button { flex-shrink: 0; padding: 10px 20px; }

#view-qaqc .report-filters, #view-planning .report-filters { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; margin: 0; border-radius: 10px; background: var(--pumpco-bg); box-shadow: none; }

#view-qaqc .report-filters label, #view-planning .report-filters label { flex: 1 1 180px; }

#qaqc-message:empty { display: none; }

.qaqc-summary { padding: 12px 16px; border: 1px solid var(--pumpco-border); border-radius: 10px; background: white; }

.qaqc-summary summary { cursor: pointer; color: var(--pumpco-blue); font-weight: 700; }

.qaqc-summary[open] summary { margin-bottom: 16px; }

.qaqc-load-status { margin: 8px 0; color: var(--pumpco-muted); font-size: .8rem; }

.qaqc-heading-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.qaqc-heading-actions select { width: auto; min-width: 88px; min-height: 34px; padding: 5px 10px; border-radius: 6px; font-size: .85rem; }

.qaqc-heading-actions .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 5px 12px; border: 1px solid #f2c400; border-radius: 6px; color: #061d3a; background: #fffdf3; font-size: .85rem; }

.qaqc-heading-actions .outline-button:hover { background: #fff5c2; }

#view-qaqc button:disabled { cursor: not-allowed; opacity: .55; }

.qaqc-heading-actions label { color: #475569; font-size: .75rem; font-weight: 700; }

.qaqc-metrics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 6px; }

.qaqc-metrics strong { font-size: 1.4rem; }

.qaqc-tab { min-height: 38px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 999px; color: var(--pumpco-navy); background: white; font-weight: 800; }

.qaqc-tab.active { border-color: var(--pumpco-navy); color: white; background: var(--pumpco-navy); }

.qaqc-actions { white-space: nowrap; }

.qaqc-actions .table-action { margin: 2px 0; }

.qaqc-dialog { width: min(820px, calc(100vw - 28px)); }

.qaqc-form { margin-top: 14px; box-shadow: none; }

.qaqc-form .wide { grid-column: 1 / -1; }

.qaqc-form .primary-button { width: 100%; margin-top: 14px; }

.report-dialog .icon-button { display: grid; place-items: center; flex-shrink: 0; color: var(--pumpco-text); background: var(--pumpco-bg); border-color: var(--pumpco-border); }

.report-dialog .icon-button:hover { border-color: var(--pumpco-yellow); background: var(--pumpco-border-soft); }

.qaqc-form input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--pumpco-blue); }

.qaqc-detail ul { margin: 0; padding-left: 18px; }

.qaqc-detail li { margin: 3px 0; }

#qaqc-pk-result { align-self: center; color: var(--pumpco-navy); }

@media (max-width: 640px) {

  #view-qaqc .planning-analysis { padding: 16px; }

  #view-qaqc .planning-section-heading { align-items: stretch; }

  .qaqc-workspace-header { padding: 12px; }

  .qaqc-module-label { display: none; }

  .qaqc-heading-actions { width: 100%; margin-left: 0; }

  .qaqc-heading-actions .outline-button { margin-left: auto; }

  #view-qaqc { padding: 16px 12px; }

  .qaqc-form .form-grid { grid-template-columns: 1fr; }

}



/* Plan de materiales (Logística) */

.material-kind { min-height: 32px; padding: 0 8px; border-radius: 7px; border: 1px solid #cbd5e1; font-size: .78rem; font-weight: 700; }

.material-kind.kind-physical { background: #ecfdf5; border-color: #6ee7b7; }

.material-kind.kind-service { background: #eff6ff; border-color: #93c5fd; }

.material-kind.kind-indirect { background: #f8fafc; border-color: #cbd5e1; color: #475569; }

.material-plan-detail { margin-top: 14px; }

.material-plan-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.material-plan-detail h3 { margin: 0; font-size: 1rem; }

.material-plan-detail ul { margin: 6px 0 0; padding-left: 18px; }

.material-plan-pick { grid-column: 1 / -1; }

#material-lot-form input[readonly] { background: #f1f5f9; color: #475569; }



/* Sidebar: grupo "Control de proyecto" con submenús */

.drawer-nav { overflow-y: auto; align-content: start; }

.nav-group { display: grid; gap: 2px; margin: 6px 0; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); }

.nav-group-toggle { display: flex; align-items: center; justify-content: space-between; padding: 8px 13px; border: 0; color: #94a3b8; background: transparent; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.nav-group-toggle:hover { color: white; }

.nav-group-items { display: grid; gap: 2px; }

.nav-group-items[hidden] { display: none; }

.nav-chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }

.nav-group.collapsed > .nav-group-toggle .nav-chevron, .nav-module:not(.open) .nav-expand .nav-chevron { transform: rotate(-45deg); }

.nav-module-row { display: flex; align-items: stretch; gap: 2px; }

.nav-module-row .drawer-link { flex: 1; display: flex; align-items: center; gap: 9px; }

.nav-expand { display: grid; place-items: center; width: 38px; border: 0; border-radius: 8px; color: #cbd5e1; background: transparent; }

.nav-expand:hover { color: white; background: rgba(255, 255, 255, .08); }

.nav-module.current > .nav-module-row .drawer-link:not(.active) { color: white; background: rgba(255, 255, 255, .06); }

.nav-sub { display: grid; gap: 1px; margin: 2px 0 6px 22px; padding-left: 12px; border-left: 2px solid rgba(255, 255, 255, .14); animation: nav-sub-in .18s ease; }

.nav-sub[hidden] { display: none; }

.nav-sub-label { padding: 8px 10px 2px; color: #64748b; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.drawer-sublink { padding: 8px 10px; border: 0; border-radius: 7px; color: #cbd5e1; background: transparent; text-align: left; font-size: .86rem; font-weight: 600; }

.drawer-sublink:hover { color: white; background: rgba(255, 255, 255, .08); }

.drawer-sublink.active { color: var(--pumpco-navy); background: var(--pumpco-yellow); font-weight: 800; }

@keyframes nav-sub-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }



/* Subpáginas de Planificación */

.subpage-off { display: none !important; }



[data-requires][hidden], [data-feature][hidden], .nav-group[hidden] { display: none !important; }

/* En pantallas angostas la leyenda del mapa va debajo del selector de tarea. */

@media (max-width: 680px) { .map-legend { top: 112px; right: auto; left: 12px; } }






/* Seguimiento de campaña · Fase 1 */

.campaign-strip-card { margin-top: 16px; }

/* En el celular el mapa lineal por progresiva no entra en el ancho: se oculta y queda la tabla con el mapa. */

@media (max-width: 680px) { .campaign-strip-card { display: none; } }

#campaign-strip-chart { display: block; width: 100%; height: auto; border-radius: 9px; background: #0f172a; }

.campaign-status { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; background: #e2e8f0; color: #334155; }

.campaign-status-blocked { background: #fee2e2; color: #b91c1c; }

.campaign-status-enabled { background: #dbeafe; color: #1d4ed8; }

.campaign-status-in_field, .campaign-status-sampled, .campaign-status-in_laboratory, .campaign-status-result_received { background: #cffafe; color: #0e7490; }

.campaign-status-approved { background: #dcfce7; color: #15803d; }

.campaign-gate { display: block; max-width: 240px; margin-top: 5px; color: #b91c1c; line-height: 1.35; }



/* Shell de navegación: lateral fijo en escritorio; en pantallas angostas, menú desde el header (o deslizando), barra inferior Inicio · Mapa y botón flotante para un formulario nuevo. */

:root { --sidebar-width: 272px; }

.topbar { min-height: var(--topbar-height); border-bottom-width: 5px; }

#drawer-toggle { display: none; }

.drawer-link { display: flex; align-items: center; gap: 12px; }

.nav-svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.nav-section-label { padding: 14px 13px 4px; color: #8d9db2; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.nav-search { display: flex; align-items: center; gap: 8px; margin: 14px 12px 0; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; color: #aab7c8; background: rgba(255, 255, 255, .06); font-size: inherit; letter-spacing: 0; }

.nav-search:focus-within { border-color: var(--pumpco-yellow); }

.nav-search input { min-height: 42px; padding: 0; border: 0; color: white; background: transparent; box-shadow: none; }

.nav-search input:focus { box-shadow: none; }

.nav-search input::placeholder { color: #8d9db2; }

.nav-miss { display: none !important; }

.drawer-nav.searching .nav-section-label, .drawer-nav.searching .nav-group-toggle { display: none; }

.drawer-nav.searching .nav-group-items[hidden] { display: grid !important; }

.drawer-nav.searching .nav-group { border: 0; }

.sidebar-collapse { display: none; }



/* Sin zoom por doble toque: con la página ampliada, el header, la barra inferior y el menú (fijos) quedan fuera de pantalla.

   El mapa conserva su propio zoom con dos dedos (MapLibre maneja los gestos sobre el canvas). */

html { touch-action: manipulation; }

/* La página nunca se desplaza de costado: un elemento más ancho que la pantalla (por ejemplo, con el tamaño de letra

   del sistema agrandado) se recorta en vez de permitir arrastrar todo el contenido. «clip» no rompe el header sticky. */

html, body { max-width: 100%; overflow-x: clip; }

/* Los formularios son grillas de una columna: sin minmax(0, …) la columna crece hasta el ancho mínimo del campo más

   largo (un selector con opciones extensas) y ensancha todo el formulario. */

form { grid-template-columns: minmax(0, 1fr); }

fieldset { min-width: 0; }

form input, form select, form textarea { min-width: 0; max-width: 100%; }



/* Contador de borradores en el menú */

.nav-count { min-width: 24px; margin-left: auto; padding: 2px 8px; border-radius: 999px; color: var(--pumpco-navy); background: var(--pumpco-yellow-bright); font-size: .75rem; font-weight: 900; text-align: center; }

.drawer-link.active .nav-count { color: white; background: var(--pumpco-navy); }



/* Botón flotante "Nuevo formulario": abajo a la derecha, por encima de la barra inferior. */

.fab-new { position: fixed; right: 16px; bottom: calc(var(--bottom-nav-height) + var(--browser-bottom-offset, 0px) + 16px); z-index: 35; display: grid; width: 58px; height: 58px; padding: 0; place-items: center; border: 0; border-radius: 18px; color: var(--pumpco-navy); background: var(--pumpco-yellow-bright); box-shadow: 0 8px 20px rgba(6, 29, 58, .3); }

.fab-new svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.fab-new:active { transform: scale(.96); }

.fab-new[hidden], .fab-new.on-form { display: none !important; }



/* Barra inferior de tareas (APK y navegador móvil): Inicio · Mapa · Enviados · Borradores · Validación */

.bottom-nav { bottom: var(--browser-bottom-offset, 0px); z-index: 34; align-items: stretch; padding: 0 4px max(4px, env(safe-area-inset-bottom)); }

.tab, .tab.active { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; color: #5f6f85; background: transparent; box-shadow: none; font-size: .7rem; font-weight: 800; }

.tab[hidden] { display: none !important; }

.tab.active { color: var(--pumpco-navy); }

.tab-icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }

.tab-badge { position: absolute; top: -4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid white; border-radius: 999px; color: var(--pumpco-navy); background: var(--pumpco-yellow-bright); font-size: .64rem; font-weight: 900; line-height: 14px; text-align: center; }

.tab-badge[hidden] { display: none !important; }

.tab-svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tab:not(.tab-primary) .tab-svg { box-sizing: content-box; padding: 3px 15px; border-radius: 999px; }

.tab.active:not(.tab-primary) .tab-svg { background: #fff1b8; }

.tab-primary { justify-content: flex-start; }

.tab-primary-icon { display: grid; width: 54px; height: 54px; margin-top: -20px; place-items: center; border-radius: 16px; color: var(--pumpco-navy); background: var(--pumpco-yellow-bright); box-shadow: 0 6px 16px rgba(6, 29, 58, .25); }

.tab-primary-icon .tab-svg { width: 26px; height: 26px; stroke-width: 2.2; }

.tab-primary.active .tab-primary-icon { box-shadow: 0 0 0 3px var(--pumpco-navy), 0 6px 16px rgba(6, 29, 58, .25); }



body.mobile-shell .application { padding-bottom: calc(var(--bottom-nav-height) + var(--browser-bottom-offset, 0px) + 96px); }

body.mobile-shell #drawer-toggle { display: grid; color: white; border: 1px solid rgba(255, 255, 255, .22); background: transparent; }

body.mobile-shell #view-map { bottom: calc(var(--bottom-nav-height) + var(--browser-bottom-offset, 0px)); }

body.mobile-shell #view-map .map-copy { bottom: 88px; }

body.mobile-shell #view-map .maplibregl-ctrl-bottom-right { right: 84px; }

body.mobile-shell .drawer { width: min(88vw, 360px); padding-top: env(safe-area-inset-top); }

body.mobile-shell .drawer .brand, body.mobile-shell .my-reports-new { display: none; }



@media (max-width: 1023px) {

  .application { padding-bottom: calc(var(--bottom-nav-height) + var(--browser-bottom-offset, 0px) + 96px); }

  #drawer-toggle { display: grid; color: white; border: 1px solid rgba(255, 255, 255, .22); background: transparent; }

  /* La tarjeta del mapa de campo sube para no quedar debajo del botón flotante. */

  #view-map { bottom: calc(var(--bottom-nav-height) + var(--browser-bottom-offset, 0px)); }

  #view-map .map-copy { bottom: 88px; }

  #view-map .maplibregl-ctrl-bottom-right { right: 84px; }

  .drawer { width: min(88vw, 360px); }

  .drawer .brand, .my-reports-new { display: none; }

  .drawer { padding-top: env(safe-area-inset-top); }

}



@media (min-width: 1024px) {

  body.authenticated:not(.mobile-shell) .drawer { top: var(--topbar-height); z-index: 18; width: var(--sidebar-width); box-shadow: none; transform: none; transition: width .2s ease; }

  body:not(.mobile-shell) .drawer .brand, body:not(.mobile-shell) .drawer-overlay, body:not(.mobile-shell) .bottom-nav, body:not(.mobile-shell) .fab-new { display: none !important; }

  body:not(.mobile-shell) .application { padding-bottom: 24px; padding-left: var(--sidebar-width); transition: padding-left .2s ease; }

  /* La topbar de marca ocupa todo el ancho por encima del lateral. */

  body:not(.mobile-shell) .application > .topbar { margin-left: calc(var(--sidebar-width) * -1); transition: margin-left .2s ease; }

  body:not(.mobile-shell) #view-map { bottom: 0; left: var(--sidebar-width); width: auto; }

  body:not(.mobile-shell) .drawer-nav { padding-top: 6px; }

  body:not(.mobile-shell) .sidebar-collapse { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin: 0 12px 14px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; color: #c4cfdd; background: transparent; font-weight: 700; }

  body:not(.mobile-shell) .sidebar-collapse:hover { border-color: var(--pumpco-yellow); color: white; }

  body:not(.mobile-shell) .operator { padding: 14px 16px; }



  /* Menú contraído: sólo íconos; los submódulos se abren como menú flotante. */

  body.sidebar-collapsed:not(.mobile-shell) { --sidebar-width: 76px; }

  .sidebar-collapsed:not(.mobile-shell) .drawer .nav-label, .sidebar-collapsed:not(.mobile-shell) .nav-count, .sidebar-collapsed:not(.mobile-shell) .nav-section-label, .sidebar-collapsed:not(.mobile-shell) .nav-group-toggle, .sidebar-collapsed:not(.mobile-shell) .nav-search, .sidebar-collapsed:not(.mobile-shell) .nav-expand, .sidebar-collapsed:not(.mobile-shell) .operator > div, .sidebar-collapsed:not(.mobile-shell) .logout-button { display: none; }

  .sidebar-collapsed:not(.mobile-shell) .drawer-nav { overflow: visible; padding: 10px 8px; }

  .sidebar-collapsed:not(.mobile-shell) .nav-group { margin: 4px 0; padding: 4px 0; }

  .sidebar-collapsed:not(.mobile-shell) .nav-group-items[hidden] { display: grid !important; }

  .sidebar-collapsed:not(.mobile-shell) .drawer-link { justify-content: center; padding: 12px 0; }

  .sidebar-collapsed:not(.mobile-shell) .nav-svg { width: 21px; height: 21px; }

  .sidebar-collapsed:not(.mobile-shell) .operator { justify-content: center; padding: 12px 0; }

  .sidebar-collapsed:not(.mobile-shell) .sidebar-collapse { margin: 0 8px 14px; }

  .sidebar-collapsed:not(.mobile-shell) .sidebar-collapse .nav-svg { transform: rotate(180deg); }

  .sidebar-collapsed:not(.mobile-shell) .nav-module { position: relative; }

  .sidebar-collapsed:not(.mobile-shell) .nav-sub { display: none !important; }

  .sidebar-collapsed:not(.mobile-shell) .nav-module:hover > .nav-sub, .sidebar-collapsed:not(.mobile-shell) .nav-module:focus-within > .nav-sub { position: absolute; top: -8px; left: 100%; z-index: 60; display: grid !important; min-width: 250px; margin: 0; padding: 8px; border: 0; border-left: 14px solid transparent; border-radius: 12px; background: white; background-clip: padding-box; box-shadow: 0 16px 34px rgba(7, 22, 36, .2); animation: none; }

  .sidebar-collapsed:not(.mobile-shell) .nav-sub .drawer-sublink { color: var(--pumpco-text); }

  .sidebar-collapsed:not(.mobile-shell) .nav-sub .drawer-sublink:hover { background: var(--pumpco-bg); }

  .sidebar-collapsed:not(.mobile-shell) .nav-sub .drawer-sublink.active { background: #fff4c2; }

  .sidebar-collapsed:not(.mobile-shell) .nav-sub .nav-sub-label { color: var(--pumpco-muted); }

}



@media (max-width: 900px) {

  :root { --topbar-height: calc(64px + env(safe-area-inset-top)); }

}

.drawer-link { min-height: 42px; padding: 9px 12px; font-size: .9rem; }

.nav-module-row .drawer-link { min-width: 0; }

.drawer .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-group + .nav-group { border-top: 0; }



/* Planificación: la grilla de cada sección no puede ensancharse más que la pantalla. */

#view-planning .planning-analysis { grid-template-columns: minmax(0, 1fr); }

#view-planning .message:empty { display: none; }

#view-planning .planning-section-heading > div:first-child { flex: 1 1 auto; min-width: 0; }

#view-planning .planning-section-heading > .qaqc-heading-actions { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

#view-planning .qaqc-heading-actions button { white-space: nowrap; }

@media (max-width: 680px) {

  #view-planning .planning-section-heading > .qaqc-heading-actions { justify-content: flex-start; margin-left: 0; }

}

.curve-legend { flex-wrap: wrap; }

.planning-section-heading > * { min-width: 0; }

.drawer-nav { grid-template-columns: minmax(0, 1fr); }

.drawer-nav > *, .nav-group-items > *, .nav-module-row { min-width: 0; }

.drawer-sublink { overflow-wrap: anywhere; }



/* ===== Etapa 2 del rediseño ===== */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }



/* Breadcrumb */

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px max(24px, calc((100vw - var(--sidebar-width) - 1360px) / 2)); border-bottom: 1px solid var(--pumpco-border-soft); color: var(--pumpco-muted); background: white; font-size: .82rem; font-weight: 700; }

.breadcrumb:empty { display: none; }

.breadcrumb [aria-current] { color: var(--pumpco-text); font-weight: 800; }

.breadcrumb-sep { color: #a8b2c0; }

@media (max-width: 680px) { .breadcrumb { display: none; } }



/* Dashboard */

.dashboard-actions h2 { margin: 0 0 4px; font-size: 1.05rem; }

.dashboard-actions { padding: 20px; border: 1px solid var(--pumpco-border-soft); border-radius: var(--pce-radius); background: white; box-shadow: 0 12px 34px rgba(7, 22, 36, .06); }

.dashboard-actions { margin: 18px 0 8px; }

.action-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }

.action-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f6f8fb; font-size: .9rem; }

.action-item.danger { background: #fdf3f2; }

.action-item.warn { background: #fff8ec; }

.action-tag { padding: 3px 9px; border-radius: 999px; color: white; background: #475569; font-size: .7rem; font-weight: 900; text-transform: uppercase; }

.action-item.danger .action-tag { background: #b42318; }

.action-item.warn .action-tag { background: #9a4b00; }

.action-item.info .action-tag { background: var(--pumpco-blue); }

.action-empty { padding: 12px; color: var(--pumpco-muted); }

.dashboard-section-title { margin: 22px 0 10px; font-size: 1.05rem; }

@media (max-width: 680px) { .action-item { grid-template-columns: 1fr; } .action-item .table-action, .action-item .action-tag { justify-self: start; } }



/* AWP: restricciones como chips */

.constraint-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }

.constraint-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border: 0; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }

.constraint-chip.ok { color: #146c43; background: #e3f4ea; }

.constraint-chip.pending { color: #9a4b00; background: #fff1db; }

button.constraint-chip.pending { cursor: pointer; box-shadow: inset 0 0 0 1px rgba(154, 75, 0, .25); }

button.constraint-chip.pending:hover { color: white; background: #9a4b00; }

.status-badge.neutral { color: #334155; background: #e2e8f0; }



/* NCR: tablero por etapa */

.view-toggle { display: inline-flex; align-self: end; gap: 4px; padding: 4px; border-radius: 10px; background: #e7edf5; }

.view-toggle button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; color: var(--pumpco-muted); background: transparent; font-weight: 800; }

.view-toggle button[aria-pressed="true"] { color: var(--pumpco-text); background: white; box-shadow: 0 1px 3px rgba(6, 29, 58, .12); }

.ncr-board[hidden], #qaqc-ncr-list[hidden] { display: none; }

.ncr-board { display: grid; grid-auto-columns: minmax(250px, 1fr); grid-auto-flow: column; gap: 12px; overflow-x: auto; padding-bottom: 6px; }

.ncr-column { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border-radius: 14px; background: #edf2f7; }

.ncr-column header { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; font-weight: 900; }

.ncr-count { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: white; text-align: center; }

.ncr-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--pumpco-border-soft); border-radius: 12px; background: white; font-size: .85rem; }

.ncr-card.overdue { box-shadow: inset 3px 0 0 #b42318; }

.ncr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.ncr-card p { margin: 0; }

.ncr-card small { color: var(--pumpco-muted); }

.ncr-empty { margin: 0; color: var(--pumpco-muted); font-size: .82rem; }



/* Formulario con índice de secciones */

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }

.form-sections { padding: 12px; border: 1px solid var(--pumpco-border-soft); border-radius: var(--pce-radius); background: white; box-shadow: 0 12px 34px rgba(7, 22, 36, .06); }

.form-sections ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

.form-sections button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 9px; color: var(--pumpco-text); background: transparent; text-align: left; font-size: .88rem; font-weight: 700; }

.form-sections button:hover { background: var(--pumpco-bg); }

.form-sections button[aria-current] { background: #eef4fb; }

.form-step-num { display: grid; flex: none; width: 24px; height: 24px; place-items: center; border: 1.5px solid #c3cfdd; border-radius: 50%; color: var(--pumpco-muted); font-size: .75rem; font-weight: 900; }

.form-sections button[aria-current] .form-step-num { border-color: var(--pumpco-blue); color: white; background: var(--pumpco-blue); }

.form-sections button.done .form-step-num { border-color: #e3f4ea; color: #146c43; background: #e3f4ea; }

.form-sections-progress { margin: 2px 10px 8px; color: var(--pumpco-muted); font-size: .78rem; font-weight: 700; }

.form-section-title { scroll-margin-top: calc(var(--topbar-height) + 24px); }

@media (min-width: 1024px) {

  body:not(.mobile-shell) .form-layout { grid-template-columns: 250px minmax(0, 1fr); }

  body:not(.mobile-shell) .form-sections { position: sticky; top: calc(var(--topbar-height) + 20px); }

}

body.mobile-shell .form-sections { position: sticky; top: var(--topbar-height); z-index: 12; margin: 0 -16px; padding: 8px 12px; border-width: 0 0 1px; border-radius: 0; box-shadow: 0 6px 14px rgba(7, 22, 36, .06); }

body.mobile-shell .form-sections ol { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }

body.mobile-shell .form-sections button { min-height: 38px; white-space: nowrap; border: 1px solid var(--pumpco-border); border-radius: 999px; font-size: .82rem; }

body.mobile-shell .form-sections button[aria-current] { border-color: var(--pumpco-blue); }

body.mobile-shell .form-sections-progress { margin: 0 2px 6px; }

@media (max-width: 1023px) {

  .form-sections { position: sticky; top: var(--topbar-height); z-index: 12; margin: 0 -16px; padding: 8px 12px; border-width: 0 0 1px; border-radius: 0; box-shadow: 0 6px 14px rgba(7, 22, 36, .06); }

  .form-sections ol { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }

  .form-sections button { min-height: 38px; white-space: nowrap; border: 1px solid var(--pumpco-border); border-radius: 999px; font-size: .82rem; }

  .form-sections button[aria-current] { border-color: var(--pumpco-blue); }

  .form-sections-progress { margin: 0 2px 6px; }

}



/* Tablas como tarjetas en pantallas angostas */

@media (max-width: 680px) {

  .data-table.cardable { min-width: 0; font-size: .86rem; }

  .data-table.cardable thead { display: none; }

  .data-table.cardable, .data-table.cardable tbody, .data-table.cardable tr, .data-table.cardable td { display: block; width: 100%; }

  .data-table.cardable tr { padding: 12px 14px; border-bottom: 1px solid var(--pumpco-border-soft); }

  .data-table.cardable tbody tr:hover { background: transparent; }

  .data-table.cardable td { position: relative; min-height: 28px; padding: 5px 0 5px 38%; border: 0; overflow-wrap: anywhere; }

  .data-table.cardable td::before { position: absolute; top: 7px; left: 0; width: calc(38% - 10px); content: attr(data-label); color: var(--pumpco-muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; line-height: 1.3; text-transform: uppercase; }

  .data-table.cardable td:not([data-label]), .data-table.cardable td:first-child { padding-left: 0; }

  .data-table.cardable td:not([data-label])::before, .data-table.cardable td:first-child::before { content: none; }

  .data-table.cardable td:first-child { padding-bottom: 8px; font-size: .95rem; }

}



/* Mapa lineal de campaña */

.campaign-strip-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 12px 0 10px; }

.campaign-strip-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--pumpco-muted); font-size: .78rem; font-weight: 700; }

.campaign-strip-legend span { display: inline-flex; align-items: center; gap: 6px; }

.campaign-strip-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }

.campaign-strip-legend i.gap { background: repeating-linear-gradient(90deg, #ef4444 0 6px, #14532d 6px 9px); }

.campaign-strip-wrap { overflow-x: auto; }

.campaign-strip-wrap #campaign-strip-chart { min-width: 720px; }

.campaign-strip-mark { cursor: pointer; transition: opacity .15s ease; }

.campaign-strip-mark:hover, .campaign-strip-mark:focus { opacity: .8; stroke: #facc15; stroke-width: 1.5px; outline: none; }

@keyframes campaign-row-flash { from { background: #fff1b8; } to { background: transparent; } }

.campaign-row-flash { animation: campaign-row-flash 2.2s ease-out; }



/* ===== Correcciones móviles ===== */

/* Leyendas de bandas lineales: muestra de color + texto, siempre legibles. */

.strip-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--pumpco-muted); font-size: .78rem; font-weight: 700; }

.strip-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

.strip-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }


.campaign-strip-wrap #campaign-strip-chart { min-width: 0; }

#campaign-strip-chart { width: 100%; }



@media (max-width: 680px) {

  /* Encabezado de Planificación: título y "Actualizar" en una misma línea. */

  #planning-workspace-header .qaqc-workspace-heading { flex-wrap: nowrap; margin-bottom: 10px; }

  #planning-workspace-header .qaqc-workspace-heading h1 { flex: 1 1 auto; min-width: 0; font-size: 1.15rem; }

  #planning-workspace-header .qaqc-heading-actions { width: auto; margin-left: auto; }

  #planning-workspace-header .qaqc-heading-actions .outline-button { margin-left: 0; }



  /* Menos anidamiento visual: tarjetas con padding de móvil. */

  #view-planning .planning-analysis, #view-qaqc .planning-analysis { margin-top: 12px; padding: 14px; border-radius: 14px; }

  #view-planning .settings-card { padding: 12px; }

  #view-planning .settings-card .tilos-wrap, #view-planning .settings-card .data-table-wrap { margin: 0 -4px; }

  #view-planning .tilos-wrap { padding: 8px; }

  .planning-section-heading h2, .planning-analysis h2 { font-size: 1.08rem; }

  .planning-section-heading p { font-size: .86rem; }



  /* Acciones de cada sección alineadas a la izquierda y del mismo ancho. */

  .planning-section-heading .qaqc-heading-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); width: 100%; margin-left: 0; }

  .planning-section-heading .qaqc-heading-actions .outline-button { margin-left: 0; white-space: normal; }



  /* KPI en dos columnas con números proporcionados. */

  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .metrics article { padding: 14px; }

  .metrics strong { font-size: 1.3rem; line-height: 1.15; overflow-wrap: anywhere; }

  .metrics span, .metrics small { font-size: .74rem; line-height: 1.3; }



  /* Selectores segmentados: una sola línea con desplazamiento horizontal. */

  .view-toggle { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }

  .view-toggle button { flex: 0 0 auto; white-space: nowrap; }

  .campaign-strip-toolbar { display: grid; gap: 10px; }

  .strip-legend, .campaign-strip-legend { gap: 6px 12px; font-size: .74rem; }

}

@media (max-width: 680px) {

  #view-planning, #view-qaqc { padding-top: 12px; }

  #view-planning .planning-section-heading .qaqc-heading-actions button { white-space: normal; line-height: 1.25; }

}

@media (max-width: 680px) {

  .metrics article > span, .metrics article > small { display: block; line-height: 1.3; }

}



/* Dashboard: acciones del encabezado y tabla de reportes integrada. */

.view-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.view-heading-actions .primary-button { width: auto; min-height: 42px; margin: 0; padding: 0 18px; }

@media (max-width: 680px) { .view-heading-actions { margin-top: 12px; } .view-heading-actions .outline-button { margin-top: 0; } }

.dashboard-reports { margin-top: 8px; scroll-margin-top: 16px; }



/* Campaña Geotécnica: mapa lineal arriba; tabla con filtros y mapa de puntos abajo. */

.campaign-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 16px; margin-top: 16px; }

.campaign-table-pane { min-width: 0; }

.campaign-table-pane .report-filters { margin-top: 0; }

.campaign-table-pane .data-table-wrap { max-height: none; overflow: visible; }

.campaign-table-pane thead th { position: sticky; top: 0; z-index: 1; }

.campaign-map-panel { min-height: 420px; }

#campaign-map { position: absolute; inset: 0; }

#campaign-table-body tr { cursor: pointer; }

@media (max-width: 1100px) {

  .campaign-layout { grid-template-columns: 1fr; }

  .campaign-map-panel { order: -1; min-height: 360px; }

}



/* Reportes por empresa: aviso de alcance, resumen por empresa (Admin e Inspector YPF) y empresa en el formulario. */

.company-scope-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--pumpco-border); border-radius: 12px; color: var(--pumpco-blue); background: white; font-size: .9rem; font-weight: 700; }

.company-scope-banner[hidden], .form-company[hidden], [data-company-col][hidden], [data-company-filter][hidden] { display: none !important; }

.company-scope-banner svg, .form-company svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.company-summary { margin: 22px 0 8px; }

.company-summary-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.company-summary-heading > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.company-summary-heading h2 { margin: 0; font-size: 1.05rem; }

.company-summary-scope { padding: 3px 9px; border-radius: 999px; color: #334155; background: #e2e8f0; font-size: .7rem; font-weight: 800; text-transform: uppercase; }

.company-summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px; }

.company-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--pumpco-border-soft); border-top: 5px solid var(--pumpco-blue); border-radius: var(--pce-radius); background: white; box-shadow: 0 12px 34px rgba(7, 22, 36, .06); }

.company-card.inactive { border: 2px dashed #b42318; background: #fdf3f2; box-shadow: none; }

.company-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.company-card h3 { margin: 0; font-size: 1.25rem; }

.company-card p { margin: 0; color: var(--pumpco-muted); font-size: .82rem; }

.company-card dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-size: .88rem; }

.company-card dt { color: var(--pumpco-muted); }

.company-card dd { margin: 0; font-weight: 800; }

.company-card dd.warn { color: #9a3412; }

.company-card dd.danger { color: #b42318; }

.company-card .table-action { align-self: flex-start; }

.company-status { padding: 4px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; }

.company-status.ok { color: #166534; background: #dcfce7; }

.company-status.warn { color: #9a3412; background: #ffedd5; }

.company-status.danger { color: white; background: #b42318; }

.company-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; color: white; background: var(--pumpco-blue); font-size: .72rem; font-weight: 800; white-space: nowrap; }

.form-company { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px; border-radius: 14px; color: white; background: #0d1b28; }

.form-company svg { stroke: var(--pumpco-yellow-bright); width: 22px; height: 22px; }

.form-company span { display: flex; flex-direction: column; gap: 2px; }

.form-company small { color: #cbd5e1; font-size: .75rem; }

.form-company strong { font-size: 1.1rem; }



/* Campaña: validación interna Pumpco y revisión YPF (ejes separados) y nómina de responsables. */

.review-badge { display: flex; gap: 6px; align-items: center; width: max-content; margin-bottom: 4px; padding: 3px 8px; border-radius: 999px; color: #334155; background: #e2e8f0; font-size: .7rem; font-weight: 700; }

.review-badge b { font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }

.review-badge.pumpco-engineering_validated { color: #1d4ed8; background: #dbeafe; }

.review-badge.pumpco-validated, .review-badge.ypf-approved { color: #166534; background: #dcfce7; }

.review-badge.pumpco-observed, .review-badge.ypf-observed { color: #b42318; background: #fdecec; }

.review-badge.ypf-pending { color: #9a3412; background: #ffedd5; }

.review-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.table-action.subtle { border-style: dashed; }

.campaign-review-status { display: flex; flex-wrap: wrap; gap: 8px; }

.campaign-history { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }

.campaign-history li { display: grid; gap: 3px; padding: 10px 12px; border-left: 4px solid var(--pumpco-blue); border-radius: 8px; background: #f6f8fb; font-size: .86rem; }

.campaign-history li.history-ypf { border-left-color: #9a3412; }

.campaign-history small { color: var(--pumpco-muted); }

.campaign-history q { color: var(--pumpco-text); font-style: italic; }

.history-axis { color: var(--pumpco-muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }



/* Validación QA/QC: responsables (sólo lectura), filtros y diálogo de comentario. */

.review-comment-dialog form { display: grid; gap: 14px; margin: 0; padding: 20px; border: 0; box-shadow: none; }

.review-comment-dialog textarea { width: 100%; }

.review-comment-actions { display: flex; justify-content: flex-end; gap: 10px; }

.review-comment-actions .primary-button { padding: 0 20px; }



/* Login: servidor de pruebas (túnel Cloudflare). */

.login-server { display: grid; gap: 10px; }

.login-server summary { cursor: pointer; color: #475569; font-size: .85rem; font-weight: 700; }

.login-server[open] summary { margin-bottom: 4px; }

.login-server small { color: #64748b; font-size: .78rem; }

.login-server-current { margin: -8px 0 0; color: #64748b; font-size: .78rem; }

.signature-line { display: block; margin-top: 6px; font-size: .74rem; font-weight: 800; }

.signature-line.signed { color: #166534; }

.signature-line.unsigned { color: #9a3412; }

.validation-blocked { display: block; max-width: 240px; margin-top: 4px; color: #9a3412; line-height: 1.35; }



/* Filtros de Reportes y de Validación QA/QC: las columnas se acomodan al ancho disponible

   (con columnas fijas, entre ~1000 y 1300 px la última se salía del cuadro). */

#reports-filter-form, #validation-filter-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }

.validation-mine { align-self: center; flex-direction: row; line-height: 1.3; }



/* Casillas de verificación junto a su texto (antes se dibujaban como un campo de ancho completo). */

label:has(> input[type="checkbox"]) { display: flex; flex-direction: row; align-items: center; gap: 10px; }
/* Las casillas ocultas (p. ej. las actividades de otro tipo de reporte) no se muestran: la regla de arriba le gana a label[hidden]. */
label:has(> input[type="checkbox"])[hidden] { display: none; }

label > input[type="checkbox"] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; accent-color: var(--pumpco-blue); }



/* Botones de tramo del mapa lineal: se desplazan en vez de salirse del cuadro en el celular. */

#campaign-strip-range { max-width: 100%; overflow-x: auto; }

#campaign-strip-range button { flex: none; white-space: nowrap; }



/* Sidebar estilo Gmail (Web y Mobile): contenedor aislado, cabecera/pie fijos y scrollbar delgado que solo aparece al pasar el mouse o hacer scroll. */

body.drawer-open { overflow: hidden; overscroll-behavior: none; }

.drawer-overlay { touch-action: none; overscroll-behavior: contain; }

.drawer { overflow: hidden; overscroll-behavior: contain; max-height: 100vh; max-height: 100dvh; }

.drawer > .brand, .drawer > .nav-search, .drawer > .operator, .drawer > .sidebar-collapse { flex: none; }

.drawer > .nav-search { margin-bottom: 6px; }

.drawer-nav {

  flex: 1 1 0%;

  min-height: 0;

  overflow-y: auto;

  overflow-x: hidden;

  overscroll-behavior: contain;

  -webkit-overflow-scrolling: touch;

  touch-action: pan-y;

  scrollbar-width: thin;

  scrollbar-gutter: stable;

  scrollbar-color: transparent transparent;

  border-top: 1px solid transparent;

  transition: border-color .18s ease, box-shadow .18s ease;

}

.drawer-nav.is-scrolled {

  border-top-color: rgba(255, 255, 255, .12);

  box-shadow: inset 0 6px 8px -6px rgba(0, 0, 0, .45);

}

.drawer:hover .drawer-nav,

.drawer-nav:focus-within,

.drawer-nav.is-scrolling {

  scrollbar-color: rgba(255, 255, 255, .28) transparent;

}

.drawer-nav::-webkit-scrollbar { width: 6px; height: 6px; }

.drawer-nav::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }

.drawer-nav::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

.drawer-nav::-webkit-scrollbar-thumb {

  border-radius: 999px;

  background-color: transparent;

  transition: background-color .18s ease;

}

.drawer:hover .drawer-nav::-webkit-scrollbar-thumb,

.drawer-nav:focus-within::-webkit-scrollbar-thumb,

.drawer-nav.is-scrolling::-webkit-scrollbar-thumb {

  background-color: rgba(255, 255, 255, .26);

}

.drawer-nav::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .44); }

.drawer-nav::-webkit-scrollbar-thumb:active { background-color: rgba(255, 255, 255, .58); }



@media (max-width: 1023px) {

  .drawer { height: 100vh; height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }

  .drawer-nav { scrollbar-gutter: auto; }

  .drawer-nav::-webkit-scrollbar { width: 4px; }

}



body.mobile-shell .drawer { height: 100vh; height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }

body.mobile-shell .drawer-nav { scrollbar-gutter: auto; }

body.mobile-shell .drawer-nav::-webkit-scrollbar { width: 4px; }



@media (min-width: 1024px) {

  body.authenticated:not(.mobile-shell) .drawer { max-height: calc(100vh - var(--topbar-height)); max-height: calc(100dvh - var(--topbar-height)); }

  .sidebar-collapsed:not(.mobile-shell) .drawer-nav { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; scrollbar-gutter: auto; }

  .sidebar-collapsed:not(.mobile-shell) .drawer-nav::-webkit-scrollbar { display: none; }

  .sidebar-collapsed:not(.mobile-shell) .drawer-nav:has(.nav-module:hover, .nav-module:focus-within) { overflow: visible; }

}





/* ── Campaña Geotécnica: Control de Calidad Digital en Tiempo Real ── */

.campaign-qaqc-header { display: grid; gap: 16px; margin-bottom: 14px; border-top: 4px solid var(--pumpco-blue); }



.campaign-qaqc-kpis { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }

.campaign-telemetry-fieldset { display: grid; gap: 12px; margin: 10px 0; padding: 14px; border: 1px solid #cbd5e1; border-left: 4px solid var(--pumpco-blue); border-radius: 12px; background: #f8fafc; }



.campaign-code-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }


.gps-tag { display: inline-block; padding: 2px 6px; border-radius: 999px; color: #475569; background: #f1f5f9; font-size: .7rem; font-weight: 700; }

.gps-tag.gps-live { color: #0f766e; background: #ccfbf1; }



.telemetry-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }

.telemetry-pill { display: inline-block; padding: 2px 7px; border-radius: 6px; color: #1e3a8a; background: #dbeafe; font-size: .7rem; font-weight: 700; white-space: nowrap; }



.campaign-warning-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }

.campaign-warning-chip { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: .69rem; font-weight: 800; }

.campaign-warning-chip.severity-warning { color: #9a3412; background: #ffedd5; }

.campaign-warning-chip.severity-critical { color: #b42318; background: #fdecec; border: 1px solid #fca5a5; }



.phase-gates-mini { display: flex; align-items: center; gap: 4px; margin: 4px 0; }

.phase-gate-dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; font-size: .68rem; font-weight: 900; color: white; background: #94a3b8; }

.phase-gate-dot.gate-passed { background: #16a34a; }

.phase-gate-dot.gate-warning { background: #d97706; }

.phase-gate-dot.gate-blocked { background: #dc2626; }

.phase-gate-dot.gate-pending { color: #334155; background: #e2e8f0; }



.campaign-early-warnings { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid #fecaca; border-left: 5px solid #dc2626; border-radius: 12px; background: #fff5f5; }

.early-warnings-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; }

.early-warnings-header strong { color: #991b1b; font-size: .92rem; }

.early-warnings-header span { color: #7f1d1d; font-size: .78rem; }

.early-warnings-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }

.early-warning-card { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: white; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }

.early-warning-card:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, .08); }

.early-warning-card.severity-critical { border-left: 4px solid #dc2626; }

.early-warning-card.severity-warning { border-left: 4px solid #d97706; }

.early-warning-tag { display: inline-block; margin-bottom: 2px; font-size: .65rem; font-weight: 900; letter-spacing: .05em; color: #991b1b; }

.early-warning-card.severity-warning .early-warning-tag { color: #9a3412; }

.early-warning-card strong { display: block; font-size: .82rem; color: #0f172a; }

.early-warning-card small { color: #475569; font-size: .75rem; line-height: 1.35; }

















































.campaign-outbox-bar[hidden] { display: none; }

.campaign-outbox-bar {

  display: flex;

  flex-wrap: wrap;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  padding: 10px 14px;

  border: 1px solid #fcd34d;

  border-left: 4px solid #d97706;

  border-radius: 10px;

  background: #fffbeb;

  color: #92400e;

  font-size: .84rem;

  font-weight: 700;

}

.campaign-phase-dashboard {

  display: grid;

  gap: 12px;

  margin-top: 18px;

  padding: 16px;

  border: 1px solid var(--pumpco-border-soft);

  border-radius: 14px;

  background: #ffffff;

}

.campaign-actions-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));

  gap: 16px;

  margin-top: 18px;

}

.campaign-checks {

  display: flex;

  flex-wrap: wrap;

  gap: 12px 18px;

  padding: 8px 0;

}



/* Estado de la actividad: pasos propios de cada tipo (reemplaza a las compuertas 1–6). */

.workflow-cell { min-width: 220px; }

.workflow-bar { display: flex; gap: 4px; margin-bottom: 6px; }

.workflow-step { flex: 1 1 0; max-width: 28px; height: 8px; border-radius: 4px; background: #e2e8f0; }

.workflow-step.state-done { background: var(--pumpco-blue); }

.workflow-step.state-current { background: var(--pumpco-yellow-bright); }

.workflow-step.state-blocked { background: #b91c1c; }

.workflow-step.qa { outline: 2px solid var(--pumpco-yellow-bright); outline-offset: 1px; }

.workflow-current { display: block; color: var(--pumpco-text); font-size: .8rem; }

.workflow-qa { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; }

.workflow-qa.qa-approved { color: #166534; background: #dcfce7; }

.workflow-qa.qa-blocked { color: #991b1b; background: #fee2e2; }

.workflow-qa.qa-alert { color: #854d0e; background: #fef3c7; }

.workflow-qa.qa-pending { color: #475569; background: #e2e8f0; }

.workflow-qa-detail { display: block; margin-top: 3px; color: var(--pumpco-muted); font-size: .76rem; }















/* Reporte de Geotecnia: campos dibujados desde geotech_forms.json. */

.topo-planned-activity { display: grid; gap: 6px; }

.geo-hint { color: var(--pumpco-muted); font-size: .74rem; font-weight: 600; letter-spacing: 0; }




/* Campaña Topográfica. */

.topo-campaign-kpis { margin: 16px 0; }

.topo-campaign-kpis .kpi-danger strong { color: #b91c1c; }

.topo-coverage { display: grid; gap: 8px; }

.topo-coverage-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--pumpco-muted); font-size: .82rem; }

.topo-coverage-head strong { color: var(--pumpco-text); }

.topo-coverage-bar { position: relative; height: 18px; overflow: hidden; border-radius: 6px; background: #eef1f5; }

.topo-coverage-bar span { position: absolute; top: 0; bottom: 0; }

.topo-coverage-bar .done { background: var(--pumpco-blue); }

.topo-coverage-bar .progress { background: var(--pumpco-yellow-bright); }

.topo-coverage-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: #334155; font-size: .76rem; font-weight: 700; }

.topo-coverage-legend span { display: inline-flex; gap: 6px; align-items: center; }

.topo-coverage-legend i { width: 12px; height: 12px; border: 1px solid #dbe3ee; border-radius: 3px; background: #eef1f5; }

.topo-coverage-legend i.done { border-color: transparent; background: var(--pumpco-blue); }

.topo-coverage-legend i.progress { border-color: transparent; background: var(--pumpco-yellow-bright); }



/* Mapa de campo: reportes de Topografía y Geotecnia y actividades de campaña. */



.legend-report.legend-topo { background: #22d3ee; }

.legend-report.legend-other { background: #cbd5e1; }

.legend-activity { width: 10px !important; height: 10px !important; border: 2.5px solid #fb923c; border-radius: 50% !important; background: #061d3a; box-shadow: inset 0 0 0 0 transparent; }

@media (max-width: 680px) { #view-map .map-legend { flex-wrap: wrap; max-width: calc(100% - 24px); } }



/* Campaña Topográfica: mapa de avance, reportes y actividades. */

#topo-campaign-map { position: absolute; inset: 0; }

#topo-campaign-body tr { cursor: pointer; }

.topo-map-legend { top: 12px; left: 12px; right: auto; }

.legend-progress.legend-progress-topo { background: #22d3ee; box-shadow: 0 0 7px #22d3ee; }

.legend-activity.legend-activity-topo { border-color: #f2c400; }

@media (max-width: 680px) { .topo-map-legend { flex-wrap: wrap; max-width: calc(100% - 70px); } }



/* Selector de firmantes: personas sugeridas debajo del nombre o el correo. */

.signature-fieldset label:has(.signer-suggestions) { position: relative; }

.signer-suggestions { position: absolute; top: 100%; right: 0; left: 0; z-index: 30; max-height: 300px; margin: 4px 0 0; padding: 4px; overflow-y: auto; list-style: none; border: 1px solid var(--pumpco-border); border-radius: 10px; background: white; box-shadow: 0 12px 30px rgba(7, 22, 36, .18); letter-spacing: 0; text-transform: none; }

.signer-suggestions li { display: grid; gap: 2px; min-height: 44px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }

.signer-suggestions li[aria-selected="true"], .signer-suggestions li:hover { background: #fffdf4; box-shadow: inset 3px 0 0 var(--pumpco-yellow-bright); }

.signer-suggestions strong { color: var(--pumpco-text); font-size: .88rem; }

.signer-suggestions small { overflow: hidden; color: var(--pumpco-muted); font-size: .76rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.signer-suggestions .signer-empty { color: var(--pumpco-muted); font-size: .8rem; font-weight: 600; cursor: default; }

.signer-you { margin-left: 6px; padding: 1px 7px; border-radius: 999px; color: var(--pumpco-navy); background: var(--pumpco-yellow-bright); font-size: .66rem; font-weight: 800; }



/* Etapa de validación (Ingeniería y adjuntos entregables) y entrega de adjuntos por la empresa. */

.stage-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; color: #475569; background: #e2e8f0; font-size: .74rem; font-weight: 800; }

.stage-engineering { color: #854d0e; background: #fef3c7; }

.stage-observed { color: #991b1b; background: #fee2e2; }

.stage-delivery { color: #113b67; background: #dbeafe; }

.stage-attachments { color: #6b21a8; background: #f3e8ff; }

.stage-complete { color: #166534; background: #dcfce7; }

.table-action.deliver-action { border-color: var(--pumpco-yellow); color: var(--pumpco-navy); background: #fffbeb; font-weight: 800; }

.table-action.deliver-action:hover { color: var(--pumpco-navy); background: var(--pumpco-yellow-bright); }

.dashboard-deliverables[hidden] { display: none; }

.dashboard-deliverables { display: grid; gap: 10px; margin: 18px 0; padding: 18px; border: 1px solid var(--pumpco-border-soft); border-left: 4px solid var(--pumpco-yellow); border-radius: 14px; background: white; }

.dashboard-deliverables h2 { margin: 0; font-size: 1.05rem; }

.dashboard-deliverables p { margin: 0; color: var(--pumpco-muted); font-size: .88rem; }

.dashboard-deliverables .action-item { grid-template-columns: minmax(0, 1fr) auto; }

.dashboard-deliverables .action-item small { display: block; color: var(--pumpco-muted); font-size: .78rem; }

@media (max-width: 680px) { .dashboard-deliverables .action-item { grid-template-columns: minmax(0, 1fr); } }



/* Menú de usuario del encabezado (como en PPC). */

.account-menu { position: relative; flex-shrink: 0; }

.header-account .account-chevron { width: 14px; height: 14px; opacity: .7; }

.account-dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; display: grid; min-width: 260px; padding: 6px; border: 1px solid var(--pumpco-border); border-radius: 12px; background: white; box-shadow: 0 18px 40px rgba(7, 22, 36, .22); }

.account-dropdown[hidden] { display: none; }

/* Selector de idioma: en el encabezado y en el login. */
.lang-menu { position: relative; flex-shrink: 0; }

.lang-trigger { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; color: white; background: transparent; font-size: .78rem; font-weight: 800; }

.lang-trigger:hover, .lang-trigger[aria-expanded="true"] { border-color: var(--pumpco-yellow-bright); background: rgba(255, 255, 255, .06); }

.lang-trigger svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lang-dropdown { min-width: 180px; }

.lang-dropdown .account-dropdown-head { padding: 6px 12px 8px; }

.lang-dropdown button { justify-content: space-between; }

.lang-dropdown .lang-check { visibility: hidden; color: var(--pumpco-blue); }

.lang-dropdown button[aria-checked="true"] .lang-check { visibility: visible; }

.lang-menu-login { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; z-index: 5; }

.lang-menu-login .lang-trigger { border-color: var(--pumpco-border); color: var(--pumpco-text); background: white; }

.lang-menu-login .lang-trigger:hover, .lang-menu-login .lang-trigger[aria-expanded="true"] { border-color: var(--pumpco-yellow-bright); background: white; }


.account-dropdown-head { display: grid; gap: 2px; margin-bottom: 4px; padding: 10px 12px 12px; border-bottom: 1px solid var(--pumpco-border-soft); }

.account-dropdown-head strong { color: var(--pumpco-text); font-size: .95rem; }

.account-dropdown-head span { color: var(--pumpco-muted); font-size: .78rem; font-weight: 700; }

.account-dropdown button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 8px; color: var(--pumpco-text); background: transparent; font-size: .9rem; font-weight: 700; text-align: left; }

.account-dropdown button svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.account-dropdown button:hover, .account-dropdown button:focus-visible { background: #fffdf4; box-shadow: inset 3px 0 0 var(--pumpco-yellow-bright); outline: none; }

.account-dropdown .account-logout { margin-top: 4px; border-top: 1px solid var(--pumpco-border-soft); border-radius: 0 0 8px 8px; color: #b91c1c; }



/* Mi cuenta: tarjetas de perfil, contraseña y servidor de pruebas (como la página de perfil de PPC). */

.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 18px; align-items: start; max-width: 1120px; }

.account-grid #profile-form { grid-row: span 2; }

.account-panel { display: grid; gap: 14px; padding: 26px; border: 1px solid var(--pumpco-border-soft); border-radius: var(--pce-radius); background: white; box-shadow: 0 12px 34px rgba(7, 22, 36, .06); }

.account-panel-heading { scroll-margin-top: calc(var(--topbar-height) + 16px); }

.account-panel-heading h2 { width: fit-content; margin: 0; padding-bottom: 8px; position: relative; color: var(--pumpco-text); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }

.account-panel-heading h2::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 4px; border-radius: 999px; background: var(--pumpco-yellow-bright); }

.account-panel-heading p { margin: 10px 0 0; color: var(--pumpco-muted); font-size: .9rem; line-height: 1.45; }

.account-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 14px; border-radius: 12px; background: #f8fafc; }

.account-facts div { min-width: 0; }

.account-facts dt { color: var(--pumpco-muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.account-facts dd { margin: 2px 0 0; overflow: hidden; color: var(--pumpco-text); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.account-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.account-fact-wide { grid-column: 1 / -1; }

.account-hint { margin: 0; color: var(--pumpco-muted); font-size: .84rem; line-height: 1.45; }

.account-submit { width: 100%; }

.account-panel .message { margin: 0; }

@media (max-width: 680px) {

  .account-panel { padding: 18px; }

  .account-fields { grid-template-columns: minmax(0, 1fr); }

  .account-dropdown { position: fixed; top: calc(var(--topbar-height) + 6px); right: 10px; left: 10px; min-width: 0; }

  .header-account .account-chevron { display: none; }

}



/* Recorrido guiado de cada pantalla: botón «?», recuadro sobre el elemento y burbuja con la explicación. */

.help-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 2px solid var(--pumpco-yellow-bright); border-radius: 50%; color: var(--pumpco-text); background: var(--pumpco-surface); font-size: 1.2rem; font-weight: 800; cursor: pointer; }

.help-button:hover, .help-button:focus-visible { background: var(--pumpco-yellow-bright); }

.topbar .help-button { flex-shrink: 0; width: 36px; height: 36px; color: white; background: transparent; font-size: 1.05rem; }

.topbar .help-button:hover, .topbar .help-button:focus-visible { color: #071624; background: var(--pumpco-yellow-bright); }

/* En el celular el «?» no debe dejar sin lugar al buscador: el idioma se achica y el logo no se comprime. */
@media (max-width: 480px) {
  .topbar { gap: 6px; padding-right: 8px; padding-left: 8px; }
  .topbar .app-identity { flex-shrink: 0; }
  .topbar .app-identity strong { display: none; }
  .topbar .lang-trigger { gap: 0; padding: 0 6px; }
  .topbar .lang-trigger svg { display: none; }
}

/* Acceso restringido no tiene nada que explicar. */
body:has(#view-denied:not([hidden])) .topbar .help-button { display: none; }

.tour-layer { position: fixed; inset: 0; z-index: 10050; }

.tour-spot { position: fixed; border-radius: 12px; outline: 3px solid var(--pumpco-yellow-bright); box-shadow: 0 0 0 9999px rgba(7, 22, 36, .58); transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease; pointer-events: none; }

.tour-spot[hidden] { display: none; }

.tour-layer:has(.tour-spot[hidden]) { background: rgba(7, 22, 36, .58); }

.tour-card { position: fixed; z-index: 10051; display: grid; gap: 9px; padding: 16px 18px; border-top: 5px solid var(--pumpco-yellow-bright); border-radius: 14px; color: var(--pumpco-text); background: var(--pumpco-surface); box-shadow: 0 24px 56px rgba(7, 22, 36, .48), 0 0 0 1px rgba(15, 23, 42, .08); transition: left .22s ease, top .22s ease; max-height: calc(100vh - 24px); overflow-y: auto; }

.tour-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.tour-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.tour-card h2 { margin: 2px 0 0; color: var(--pumpco-text); font-size: 1.08rem; line-height: 1.3; }

.tour-card p { margin: 0; line-height: 1.52; font-size: .92rem; }

.tour-body-text code { padding: 1px 5px; border-radius: 5px; background: rgba(14, 116, 144, .1); color: #0e7490; font-size: .84em; font-weight: 600; }

.tour-body-text.is-loading { opacity: .72; }

.tour-card .tour-step { color: #b45309; background: rgba(245, 158, 11, .16); padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.tour-module-pill { color: var(--pumpco-muted); font-size: .73rem; font-weight: 700; }

.tour-mode-switch { display: inline-flex; background: rgba(15, 23, 42, .06); border-radius: 999px; padding: 2px; gap: 2px; }

.tour-mode-btn { border: 0; background: transparent; color: var(--pumpco-muted); font-size: .71rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap; }

.tour-mode-btn.active { background: #0f172a; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }

.tour-progress-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(8px, 1fr)); gap: 3px; align-items: center; }

.tour-dot { height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgba(15, 23, 42, .14); cursor: pointer; transition: background .15s ease, transform .15s ease; }

.tour-dot.is-done { background: rgba(2, 132, 199, .55); }

.tour-dot.is-current { background: var(--pumpco-yellow-bright, #f59e0b); transform: scaleY(1.35); }

.tour-dot:hover { background: #0284c7; }

.tour-jump-select { width: 100%; height: 32px; padding: 0 10px; border: 1px solid rgba(15, 23, 42, .16); border-radius: 8px; background: var(--pumpco-surface); color: var(--pumpco-text); font-size: .8rem; font-weight: 600; cursor: pointer; }

.tour-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

.tour-card footer span { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }

.tour-card footer .outline-button, .tour-card footer .primary-button { width: auto; min-height: 36px; margin: 0; padding: 0 13px; font-size: .84rem; }

.tour-card footer button:disabled { opacity: .45; cursor: default; }

.tour-skip { padding: 0; border: 0; color: var(--pumpco-muted); background: none; font-size: .82rem; text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }

/* Firmantes Field Verification: uno por fila, con «+ Agregar firmante». */

.signer-rows { display: grid; gap: 10px; }

.signer-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: end; }

.signer-row .remove-row { width: 44px; height: 47px; border: 1px solid #fecaca; border-radius: 10px; color: #b91c1c; background: white; font-size: 1.4rem; line-height: 1; }

.signer-row .remove-row[hidden] { display: block; visibility: hidden; }

.signer-row label:has(.signer-suggestions) { position: relative; }

.add-signer { justify-self: start; width: auto; }

.add-signer[hidden] { display: none; }

@media (max-width: 680px) {

  .signer-row { grid-template-columns: minmax(0, 1fr) 44px; }

  .signer-row label:nth-child(2) { grid-column: 1; }

  .signer-row .remove-row { grid-column: 2; grid-row: 1; }

}

.stage-note { color: var(--pumpco-muted); font-size: .72rem; font-weight: 700; }

/* Reporte de Topografía ARLNG: cuadrilla, recursos y tabla de actividades realizadas. */

.topo-crew-row, .topo-resource-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 44px; }

.topo-resource-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 44px; }

.topo-resource-row select { min-width: 0; }

.topo-crew-row label:has(.signer-suggestions) { position: relative; }

.topo-photo-row { grid-template-columns: 120px minmax(0, 1fr) 44px; }

/* Personas y equipos no registrados: se cargan a mano. Un equipo «Otro» suma tipo y descripción a la fila. */
.topo-manual-note { grid-column: 1 / -1; color: var(--pumpco-muted); font-size: .78rem; }
.topo-resource-row:has([data-manual-resource]:not([hidden])) { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, .9fr) 44px; }

/* Foto del reporte en papel: una fila por hoja, como las fotos del informe. */
.topo-paper-report { display: grid; gap: 8px; margin: 4px 0 12px; }
.topo-paper-report h2 small { font-weight: 500; text-transform: none; }
.topo-paper-row { grid-template-columns: 120px minmax(0, 1fr) 44px; align-items: center; }
.topo-paper-label { font-weight: 600; color: var(--pumpco-navy); }

/* Apertura de caminos (Contreras): HH y horas caídas en la cuadrilla y las filas del parte diario de producción. */
[data-topo-show-for][hidden], [data-topo-hide-for][hidden] { display: none !important; }
[data-form-type="topografia"]:not([data-topo-form-type="apertura_caminos"]) [data-road-only] { display: none; }
[data-topo-form-type="apertura_caminos"] .topo-crew-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 84px 96px 44px; }
/* Subsecciones del parte diario: más chicas que el título de la sección. */
.topo-parte h3.form-section-title { margin: 6px 0 0; padding: 6px 10px; background: #334155; font-size: .72rem; }
/* Más actividades de Apertura de caminos: título, PK inicial, PK final y quitar; abajo, el comentario. */
.topo-road-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
.topo-road-row-title { grid-column: 1 / -1; color: var(--pumpco-navy); }
.topo-road-row-comment { grid-column: 1 / -1; }
[data-topo-rows="paradas"] .topo-parte-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 44px; }
[data-topo-rows="equipos_parte"] .topo-parte-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 96px 44px; }
/* Red de apoyo: una fila por monumentación con su coordenada y el botón para tomarla con el GPS. */
.topo-monuments { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--pumpco-border-soft); border-radius: 12px; background: white; }
.topo-monuments[hidden] { display: none; }
.topo-monuments-title { color: var(--pumpco-navy); }
.topo-monuments .form-type-note { margin: 0; }
/* «Cantidad de …»: campo angosto al lado de su título. */
.topo-monuments-count { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.topo-monuments-count input { width: 96px; text-align: center; font-weight: 800; }
.topo-monument-row { grid-template-columns: 88px minmax(0, 1fr) 112px 128px 44px; }
/* Calicata: además, si es sistemática o intensificada. Arriba Nº, coordenadas, tipo y quitar; abajo GPS y fotos. */
.topo-monument-row.topo-calicata-row { grid-template-columns: 88px minmax(0, 1fr) 170px 44px; }
.topo-monument-row.topo-calicata-row > .topo-monument-num-field { grid-column: 1; grid-row: 1; }
.topo-monument-row.topo-calicata-row > label:not(.topo-monument-num-field):not(.topo-monument-photo-btn):not(.topo-calicata-type) { grid-column: 2; grid-row: 1; }
.topo-monument-row.topo-calicata-row > .topo-calicata-type { grid-column: 3; grid-row: 1; }
.topo-monument-row.topo-calicata-row > .remove-row { grid-column: 4; grid-row: 1; }
.topo-monument-row.topo-calicata-row > .topo-monument-gps:not(.topo-monument-photo-btn) { grid-column: 1 / 3; grid-row: 2; }
.topo-monument-row.topo-calicata-row > .topo-monument-photo-btn { grid-column: 3 / -1; grid-row: 2; width: 100% !important; }
.topo-monument-row.topo-calicata-row > .topo-monument-photos { grid-column: 1 / -1; grid-row: 3; }
.topo-monument-num-field input { text-align: center; font-weight: 800; color: var(--pumpco-navy); }
.topo-monument-row:not(.topo-gate-row) > [data-monument-number] { display: none; }
.topo-monument-row .topo-monument-photos { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--pumpco-border-soft); }
.topo-monument-row .topo-monument-photos[hidden] { display: none; }
.topo-monument-photos-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.topo-monument-photo-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; min-height: 47px; padding: 0 14px; font-weight: 700; cursor: pointer; margin: 0; width: auto !important; white-space: nowrap; }
.topo-monument-upload-btn { padding: 6px 12px; min-height: 34px; font-size: .82rem; font-weight: 700; }
.topo-monument-photos small { color: var(--pumpco-muted); font-weight: 600; font-size: .8rem; }
.topo-monument-photo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.topo-monument-photo-chips[hidden] { display: none; }
.topo-monument-photo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #f1f5f9; border: 1px solid #cbd5e1; color: var(--pumpco-navy); }
.topo-monument-photo-chip.is-uploaded { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.topo-monument-photo-chip button { border: 0; background: transparent; color: #b91c1c; font-weight: 800; cursor: pointer; padding: 0 2px; line-height: 1; font-size: .9rem; }
/* Tramo de cada actividad (varias marcadas): nombre arriba y los dos PK lado a lado. */
.topo-activity-tramo-rows { display: grid; gap: 10px; }
.topo-activity-tramo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; align-items: end; }
.topo-activity-tramo strong { grid-column: 1 / -1; font-size: .85rem; color: var(--pumpco-navy); }
/* Tranqueras: además de la ubicación, el estado en que se encontró cada una. */
.topo-monument-row.topo-gate-row { grid-template-columns: 44px minmax(0, 1fr) minmax(140px, 180px) auto 44px; }
/* Fotos de cada tranquera: debajo de la ubicación y el estado, a todo el ancho. */
.topo-gate-row .topo-gate-photos { grid-column: 2 / -1; }
.topo-gate-row .topo-gate-photos small { color: var(--pumpco-muted); font-weight: 600; }
/* Aviso de tranquera cercana a otra ya cargada: ocupa todo el ancho de la fila, debajo de la ubicación. */
.topo-gate-row .topo-gate-nearby { display: grid; grid-column: 1 / -1; gap: 6px; padding: 10px 12px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; color: #78350f; }
.topo-gate-row .topo-gate-nearby[hidden] { display: none; }
.topo-gate-nearby p { margin: 0; }
.topo-gate-nearby small { color: #92400e; }
.topo-gate-nearby-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.topo-monument-number { align-self: center; color: var(--pumpco-navy); font-weight: 800; }
.topo-monument-gps { min-height: 47px; white-space: nowrap; }
.topo-monument-gps.is-busy { cursor: progress; opacity: .7; }

.topo-work { display: grid; gap: 8px; }

.topo-work-row { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }

.topo-work-row.done { border-color: var(--pumpco-yellow); background: #fffdf4; }

.topo-work-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr); gap: 10px; }

.topo-work-fields[hidden] { display: none; }

.topo-quick-entry { display: grid; gap: 12px; padding: 4px 0 10px; }

.topo-advanced { border: 1px solid var(--pumpco-border-soft); border-radius: 12px; background: #f8fafc; }

.topo-advanced summary { padding: 14px 16px; cursor: pointer; color: var(--pumpco-navy); font-weight: 800; }

.topo-advanced-content { display: grid; gap: 14px; padding: 0 14px 16px; border-top: 1px solid var(--pumpco-border-soft); }

@media (max-width: 680px) {

  .topo-crew-row, .topo-resource-row { grid-template-columns: minmax(0, 1fr) 44px; }

  .topo-crew-row label, .topo-resource-row label { grid-column: 1; }

  .topo-crew-row .remove-row, .topo-resource-row .remove-row { grid-column: 2; grid-row: 1; }

  .topo-resource-row:has([data-manual-resource]:not([hidden])) { grid-template-columns: minmax(0, 1fr) 44px; }

  [data-topo-form-type="apertura_caminos"] .topo-crew-row, .topo-parte-row, [data-topo-rows] .topo-parte-row { grid-template-columns: minmax(0, 1fr) 44px; }

  .topo-parte-row label { grid-column: 1; }

  .topo-parte-row .remove-row { grid-column: 2; grid-row: 1; }
  /* Arriba Nº, coordenadas y quitar; abajo «Usar GPS» y «+ Fotos» del mismo ancho; debajo, las fotos. */
  .topo-monument-row { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .topo-monument-row:not(.topo-gate-row) > .topo-monument-num-field { grid-column: 1; grid-row: 1; }
  .topo-monument-row:not(.topo-gate-row) > label:not(.topo-monument-num-field):not(.topo-monument-photo-btn):not(.topo-calicata-type) { grid-column: 2 / 4; grid-row: 1; }
  /* Calicata en el celular: Nº, coordenadas y quitar; el tipo en su renglón; debajo «Usar GPS» y «+ Fotos». */
  .topo-monument-row.topo-calicata-row { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .topo-monument-row.topo-calicata-row > label:not(.topo-monument-num-field):not(.topo-monument-photo-btn):not(.topo-calicata-type) { grid-column: 2 / 4; }
  .topo-monument-row.topo-calicata-row > .topo-calicata-type { grid-column: 1 / -1; grid-row: 2; }
  .topo-monument-row.topo-calicata-row > .topo-monument-gps:not(.topo-monument-photo-btn) { grid-column: 1 / 3; grid-row: 3; }
  .topo-monument-row.topo-calicata-row > .topo-monument-photo-btn { grid-column: 3 / -1; grid-row: 3; }
  .topo-monument-row.topo-calicata-row > .topo-monument-photos { grid-row: 4; }
  .topo-monument-row:not(.topo-gate-row) > .remove-row { grid-column: 4; grid-row: 1; }
  .topo-monument-row .topo-monument-gps:not(.topo-monument-photo-btn) { grid-column: 1 / 3; grid-row: 2; }
  .topo-monument-row .topo-monument-photo-btn { grid-column: 3 / -1; grid-row: 2; width: 100% !important; padding: 0 8px; }
  .topo-monument-row .topo-monument-photos { grid-column: 1 / -1; grid-row: 3; }
  .topo-monument-row.topo-gate-row { grid-template-columns: 36px minmax(0, 1fr) 44px; }
  .topo-gate-row label:has(select) { grid-column: 1 / -1; grid-row: 2; }
  /* Más específica que la de Usar GPS de las monumentaciones (fila 2), que la ponía encima del desplegable de estado. */
  .topo-monument-row.topo-gate-row .topo-monument-gps { grid-column: 1 / -1; grid-row: 3; }
  .topo-gate-row .topo-gate-photos { grid-column: 1 / -1; grid-row: 4; }

  .topo-work-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .topo-work-fields label:last-child { grid-column: 1 / -1; }

}

/* Carga rápida de Topografía: longitud calculada (no editable) y actividades ejecutadas como casillas. */

.topo-quick-entry .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: end; }

.topo-length { display: grid; gap: 6px; }

.topo-length span { color: #334155; font-size: .78rem; font-weight: 800; letter-spacing: .03em; }

.topo-length strong { display: flex; align-items: center; min-height: 47px; padding: 0 14px; border: 1px dashed var(--pumpco-border); border-radius: 10px; color: var(--pumpco-text); background: var(--pumpco-bg); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.topo-activity-picks { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 12px; }
.topo-activity-picks[hidden], .topo-description[hidden], .topo-advanced[hidden], .form-type-note[hidden] { display: none; }

.topo-activity-picks .choice-group-label, .topo-activity-picks small { grid-column: 1 / -1; }

.topo-activity-picks small { color: var(--pumpco-muted); font-size: .78rem; }

.topo-activity-picks .choice:has(input:checked) { border-color: var(--pumpco-yellow); background: #fffdf4; }

@media (max-width: 680px) {

  .topo-quick-entry .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .topo-length { grid-column: 1 / -1; }

}

.map-legend[hidden], .map-legend [hidden], .map-task-control[hidden] { display: none !important; }

/* Ubicación: latitud, longitud y el botón «Usar GPS» juntos. */

.location-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }

.location-grid #capture-location { width: auto; min-height: 47px; margin: 0; white-space: nowrap; }

.topo-description { display: grid; gap: 12px; padding-bottom: 10px; }

@media (max-width: 680px) {

  .location-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .location-grid #capture-location { grid-column: 1 / -1; width: 100%; }

}

.topo-after-details { display: grid; gap: 14px; padding-top: 6px; }

.topo-after-details[hidden] { display: none; }


/* Leyenda de Topografía en el Mapa de campo (sobre el eje entre los ductos) y áreas del KMZ. */

.legend-topo-line { background: #f8fafc; }

.legend-topo-interference { height: 10px !important; border-radius: 0 !important; background: linear-gradient(#ef4444, #ef4444) center / 100% 2px no-repeat, repeating-linear-gradient(90deg, #ef4444 0 2px, transparent 2px 5px); }

.legend-topo-monument { width: 10px !important; height: 10px !important; border: 2px solid #061d3a; border-radius: 50% !important; background: #fde047; }

.legend-area { height: 10px !important; border: 1px solid #d1d5db; border-radius: 2px !important; background: rgba(156, 163, 175, .6); }

.legend-area-surveyed { height: 10px !important; border: 1px solid #cffafe; border-radius: 2px !important; background: rgba(34, 211, 238, .7); }

/* Enviados y Borradores: en la PC son tablas; en el celular, tarjetas compactas sin rótulos repetidos. */

.my-subject small { display: block; margin-top: 2px; color: var(--pumpco-muted); }

@media (max-width: 680px) {

  .my-reports-new { display: none; }

  #view-my-reports .data-table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }

  .my-reports-table.data-table.cardable { background: transparent; }

  .my-reports-table.data-table.cardable tr.my-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "form form" "subject subject" "progress progress" "when when" "signature stage" "actions actions"; gap: 6px 8px; margin-bottom: 10px; padding: 14px; border: 1px solid var(--pumpco-border); border-radius: 14px; background: var(--pumpco-surface); box-shadow: 0 4px 14px rgba(7, 22, 36, .05); }

  .my-reports-table.data-table.cardable tr.my-row td { width: auto; min-height: 0; padding: 0; font-size: .86rem; }

  .my-reports-table.data-table.cardable tr.my-row td::before { content: none; }

  .my-reports-table tr.my-row .my-form { grid-area: form; color: var(--pumpco-muted); font-size: .72rem !important; letter-spacing: .04em; text-transform: uppercase; }

  .my-reports-table tr.my-row .my-subject { grid-area: subject; font-size: .95rem !important; line-height: 1.35; }

  .my-reports-table tr.my-row .my-progress { grid-area: progress; color: var(--pumpco-text); font-weight: 700; }

  .my-reports-table tr.my-row .my-when { grid-area: when; color: var(--pumpco-muted); font-size: .78rem !important; }

  .my-reports-table tr.my-row .my-signature { grid-area: signature; }

  .my-reports-table tr.my-row .my-stage { grid-area: stage; }

  .my-reports-table tr.my-row .my-stage:empty, .my-reports-table tr.my-row .my-signature:empty { display: none; }

  .my-reports-table tr.my-row .my-actions { grid-area: actions; margin-top: 4px; }

  .my-reports-table tr.my-row .review-actions { display: flex; flex-wrap: wrap; gap: 8px; }

  .my-reports-table tr.my-row .review-actions .table-action { flex: 1 1 auto; min-height: 40px; }

  .my-reports-table tr.my-empty td { padding: 16px; border-radius: 14px; background: var(--pumpco-surface); }

  #view-my-reports .table-pagination { flex-wrap: wrap; gap: 10px; }

}

#my-reports-message:empty { display: none; }



/* Lista de múltiples archivos adjuntos en el formulario y en el detalle del reporte */

.evidence-field-block { display: grid; gap: 8px; grid-column: 1 / -1; }

.evidence-field-block[hidden] { display: none !important; }

.evidence-files-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }

.evidence-files-list[hidden] { display: none !important; }

.evidence-file-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--pumpco-border); border-radius: 10px; background: #f8fafc; font-size: .84rem; }

.evidence-file-name { min-width: 0; overflow-wrap: anywhere; font-weight: 700; color: var(--pumpco-text); }

.evidence-file-name small { color: var(--pumpco-muted); font-weight: 600; }

.evidence-file-item .remove-row { flex: none; width: 32px; height: 32px; border: 1px solid #fecaca; border-radius: 8px; color: #b91c1c; background: white; font-size: 1.15rem; line-height: 1; }

.evidence-file-summary { color: var(--pumpco-muted); font-size: .78rem; font-weight: 700; padding: 0 4px; }









/* Tabla de reportes del Dashboard 100% responsive y sin scroll horizontal en escritorio ni móvil */

#dashboard-reports .data-table-wrap { overflow-x: hidden; max-width: 100%; }

.dashboard-reports-table.data-table { min-width: 0; width: 100%; table-layout: auto; }

.dashboard-reports-table.data-table th,

.dashboard-reports-table.data-table td { padding: 10px 8px; overflow-wrap: anywhere; word-break: break-word; }

.dashboard-reports-table .dash-when,
.dashboard-reports-table .dash-pk,
.dashboard-reports-table .dash-exec-date { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .73rem; }

.dash-when-date {
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--pumpco-text);
  font-variant-numeric: tabular-nums;
}

.dash-when-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  line-height: 1.1;
}

.dash-when-time {
  font-size: .64rem;
  color: var(--pumpco-muted);
  font-variant-numeric: tabular-nums;
}

.report-id-badge {
  display: inline-block;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(15, 43, 70, 0.08);
  color: var(--pumpco-primary, #0f2b46);
  font-size: .6rem;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.dashboard-reports-table .dash-when,
.dashboard-reports-table .dash-company,

.dashboard-reports-table .dash-priority,

.dashboard-reports-table .dash-pk,

.dashboard-reports-table .dash-exec-date,

.dashboard-reports-table .dash-signature,

.dashboard-reports-table .dash-actions { width: 1%; white-space: nowrap; }

.dashboard-reports-table .dash-subject strong { display: inline-block; line-height: 1.3; }

.dashboard-reports-table .dash-subject small { display: block; margin-top: 2px; color: var(--pumpco-muted); }
.dashboard-reports-table .dash-signature-summary { display: none; }



@media (max-width: 960px) {

  #dashboard-reports .data-table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }

  .dashboard-reports-table.data-table.cardable { background: transparent; }

  .dashboard-reports-table.data-table.cardable thead { display: none; }

  .dashboard-reports-table.data-table.cardable,

  .dashboard-reports-table.data-table.cardable tbody { display: block; width: 100%; }

  .dashboard-reports-table.data-table.cardable tr.dash-row {

    display: grid;

    grid-template-columns: minmax(0, 1fr) auto;

    gap: 6px 10px;

    align-items: center;

    margin-bottom: 10px;

    padding: 14px;

    border: 1px solid var(--pumpco-border);

    border-radius: 14px;

    background: var(--pumpco-surface);

    box-shadow: 0 4px 14px rgba(7, 22, 36, .05);

  }

  .dashboard-reports-table.data-table.cardable tr.dash-row td {

    display: block;

    width: auto;

    min-height: 0;

    padding: 0;

    border: 0;

    font-size: .85rem;

    white-space: normal;

  }

  .dashboard-reports-table.data-table.cardable tr.dash-row td::before { content: none !important; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-when { grid-column: 1; color: var(--pumpco-muted); font-size: .76rem; font-weight: 700; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-company { grid-column: 2; justify-self: end; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-subject { grid-column: 1 / -1; font-size: .95rem; line-height: 1.35; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-operator { grid-column: 1 / -1; color: var(--pumpco-muted); font-size: .8rem; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-start { grid-column: 1; color: var(--pumpco-text); font-weight: 700; font-size: .8rem; }
  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-start::before { content: "PK inicial: " !important; color: var(--pumpco-muted); font-weight: 600; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-end { grid-column: 2; justify-self: end; color: var(--pumpco-text); font-weight: 700; font-size: .8rem; }
  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-end::before { content: "PK final: " !important; color: var(--pumpco-muted); font-weight: 600; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-exec-date { grid-column: 1 / -1; color: var(--pumpco-text); font-weight: 700; font-size: .8rem; }
  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-exec-date::before { content: "Ejecución: " !important; color: var(--pumpco-muted); font-weight: 600; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-signature { grid-column: 1; align-self: center; }

  .dashboard-reports-table.data-table.cardable tr.dash-row .dash-actions { grid-column: 2; justify-self: end; }

  .dashboard-reports-table.data-table.cardable tr.dash-empty td { display: block; padding: 16px; border-radius: 14px; background: var(--pumpco-surface); }

}



body.mobile-shell #dashboard-reports .data-table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }

body.mobile-shell .dashboard-reports-table.data-table.cardable { background: transparent; }

body.mobile-shell .dashboard-reports-table.data-table.cardable thead { display: none; }

body.mobile-shell .dashboard-reports-table.data-table.cardable,

body.mobile-shell .dashboard-reports-table.data-table.cardable tbody { display: block; width: 100%; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row {

  display: grid;

  grid-template-columns: minmax(0, 1fr) auto;

  gap: 6px 10px;

  align-items: center;

  margin-bottom: 10px;

  padding: 14px;

  border: 1px solid var(--pumpco-border);

  border-radius: 14px;

  background: var(--pumpco-surface);

  box-shadow: 0 4px 14px rgba(7, 22, 36, .05);

}

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row td {

  display: block;

  width: auto;

  min-height: 0;

  padding: 0;

  border: 0;

  font-size: .85rem;

  white-space: normal;

}

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row td::before { content: none !important; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-when { grid-column: 1; color: var(--pumpco-muted); font-size: .76rem; font-weight: 700; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-company { grid-column: 2; justify-self: end; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-subject { grid-column: 1 / -1; font-size: .95rem; line-height: 1.35; }

body.mobile-shell .dashboard-reports-table .dash-subject {
  padding-top: 2px !important;
  padding-bottom: 4px !important;
}
body.mobile-shell .dashboard-reports-table .dash-subject strong { display: block; line-height: 1.4; }
body.mobile-shell .dashboard-reports-table .dash-subject small { margin-top: 4px; }
body.mobile-shell .dashboard-reports-table .dash-signature-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin-top: 9px;
  color: var(--pumpco-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body.mobile-shell .dashboard-reports-table .dash-signature-summary .signature-badge {
  padding: 4px 9px;
  font-size: .7rem;
  letter-spacing: 0;
  text-transform: none;
}

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-operator { grid-column: 1 / -1; color: var(--pumpco-muted); font-size: .8rem; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-start { grid-column: 1; color: var(--pumpco-text); font-weight: 700; font-size: .8rem; }
body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-start::before { content: "PK inicial: " !important; color: var(--pumpco-muted); font-weight: 600; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-end { grid-column: 2; justify-self: end; color: var(--pumpco-text); font-weight: 700; font-size: .8rem; }
body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-pk-end::before { content: "PK final: " !important; color: var(--pumpco-muted); font-weight: 600; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-exec-date { grid-column: 1 / -1; color: var(--pumpco-text); font-weight: 700; font-size: .8rem; }
body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-exec-date::before { content: "Ejecución: " !important; color: var(--pumpco-muted); font-weight: 600; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-signature { grid-column: 1; align-self: center; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-row .dash-actions { grid-column: 2; justify-self: end; }

body.mobile-shell .dashboard-reports-table.data-table.cardable tr.dash-empty td { display: block; padding: 16px; border-radius: 14px; background: var(--pumpco-surface); }



/* Tablas de Campaña Topográfica, Campaña Geotécnica, Validación y Parcelas 100% responsives y sin scroll horizontal */

.campaign-layout { grid-template-columns: minmax(0, 1fr); }

.campaign-layout .campaign-map-panel { order: -1; min-height: 360px; }

@media (min-width: 1100px) {

  body:not(.mobile-shell) .campaign-layout { grid-template-columns: minmax(0, 1fr); }

  body:not(.mobile-shell) .campaign-layout .campaign-map-panel { order: 0; min-height: 440px; }

}

.campaign-table-pane .data-table-wrap,

#view-validation .data-table-wrap,

[data-subpage-panel="parcels"] .data-table-wrap,

.campaign-strip-wrap {

  overflow-x: hidden;

  max-width: 100%;

}


#campaign-strip-chart {

  min-width: 0;

  width: 100%;

}

.workflow-cell { min-width: 0; }

.review-badge,

.workflow-qa,

.stage-badge,

.telemetry-pill {

  max-width: 100%;

  white-space: normal;

  overflow-wrap: anywhere;

}

.campaign-responsive-table.data-table {

  min-width: 0;

  width: 100%;

  table-layout: auto;

}

.campaign-responsive-table.data-table th,

.campaign-responsive-table.data-table td {

  padding: 10px 8px;

  overflow-wrap: anywhere;

  word-break: break-word;

}

.campaign-responsive-table .camp-pk { white-space: nowrap; }

.campaign-responsive-table .camp-actions { width: 1%; white-space: nowrap; }

.campaign-responsive-table .camp-actions .review-actions { flex-wrap: wrap; }



@media (max-width: 960px) {

  .campaign-table-pane .data-table-wrap,

  #view-validation .data-table-wrap,

  [data-subpage-panel="parcels"] .data-table-wrap {

    max-height: none;

    overflow: visible;

    border: 0;

    border-radius: 0;

    background: transparent;

    box-shadow: none;

  }

  .campaign-responsive-table.data-table.cardable { background: transparent; }

  .campaign-responsive-table.data-table.cardable thead { display: none; }

  .campaign-responsive-table.data-table.cardable,

  .campaign-responsive-table.data-table.cardable tbody { display: block; width: 100%; }

  .campaign-responsive-table.data-table.cardable tr.camp-row,

  .parcels-campaign-table.data-table.cardable tbody tr {

    display: grid;

    grid-template-columns: minmax(0, 1fr) auto;

    gap: 8px 10px;

    align-items: start;

    margin-bottom: 10px;

    padding: 14px;

    border: 1px solid var(--pumpco-border);

    border-radius: 14px;

    background: var(--pumpco-surface);

    box-shadow: 0 4px 14px rgba(7, 22, 36, .05);

  }

  .campaign-responsive-table.data-table.cardable tr.camp-row td,

  .parcels-campaign-table.data-table.cardable tbody tr td {

    display: block;

    width: auto;

    min-height: 0;

    padding: 0;

    border: 0;

    font-size: .85rem;

    white-space: normal;

  }

  .campaign-responsive-table.data-table.cardable tr.camp-row td::before,

  .parcels-campaign-table.data-table.cardable tbody tr td::before { content: none !important; }

  .campaign-responsive-table.data-table.cardable tr.camp-row .camp-activity { grid-column: 1; font-size: .92rem; line-height: 1.35; }

  .campaign-responsive-table.data-table.cardable tr.camp-row .camp-pk { grid-column: 2; justify-self: end; text-align: right; font-size: .8rem; font-weight: 700; }

  .campaign-responsive-table.data-table.cardable tr.camp-row .camp-status,

  .campaign-responsive-table.data-table.cardable tr.camp-row .camp-workflow { grid-column: 1 / -1; }

  .campaign-responsive-table.data-table.cardable tr.camp-row .camp-qa { grid-column: 1 / -1; }

  .campaign-responsive-table.data-table.cardable tr.camp-row .camp-company { grid-column: 1; color: var(--pumpco-muted); font-size: .8rem; align-self: center; }

  .campaign-responsive-table.data-table.cardable tr.camp-row .camp-actions { grid-column: 2; justify-self: end; align-self: center; }

  .campaign-responsive-table.data-table.cardable tr.camp-empty td { display: block; padding: 16px; border-radius: 14px; background: var(--pumpco-surface); }

}



body.mobile-shell .campaign-table-pane .data-table-wrap,

body.mobile-shell #view-validation .data-table-wrap,

body.mobile-shell [data-subpage-panel="parcels"] .data-table-wrap {

  max-height: none;

  overflow: visible;

  border: 0;

  border-radius: 0;

  background: transparent;

  box-shadow: none;

}

body.mobile-shell .campaign-responsive-table.data-table.cardable { background: transparent; }

body.mobile-shell .campaign-responsive-table.data-table.cardable thead { display: none; }

body.mobile-shell .campaign-responsive-table.data-table.cardable,

body.mobile-shell .campaign-responsive-table.data-table.cardable tbody { display: block; width: 100%; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row,

body.mobile-shell .parcels-campaign-table.data-table.cardable tbody tr {

  display: grid;

  grid-template-columns: minmax(0, 1fr) auto;

  gap: 8px 10px;

  align-items: start;

  margin-bottom: 10px;

  padding: 14px;

  border: 1px solid var(--pumpco-border);

  border-radius: 14px;

  background: var(--pumpco-surface);

  box-shadow: 0 4px 14px rgba(7, 22, 36, .05);

}

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row td,

body.mobile-shell .parcels-campaign-table.data-table.cardable tbody tr td {

  display: block;

  width: auto;

  min-height: 0;

  padding: 0;

  border: 0;

  font-size: .85rem;

  white-space: normal;

}

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row td::before,

body.mobile-shell .parcels-campaign-table.data-table.cardable tbody tr td::before { content: none !important; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row .camp-activity { grid-column: 1; font-size: .92rem; line-height: 1.35; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row .camp-pk { grid-column: 2; justify-self: end; text-align: right; font-size: .8rem; font-weight: 700; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row .camp-status,

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row .camp-workflow { grid-column: 1 / -1; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row .camp-qa { grid-column: 1 / -1; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row .camp-company { grid-column: 1; color: var(--pumpco-muted); font-size: .8rem; align-self: center; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-row .camp-actions { grid-column: 2; justify-self: end; align-self: center; }

body.mobile-shell .campaign-responsive-table.data-table.cardable tr.camp-empty td { display: block; padding: 16px; border-radius: 14px; background: var(--pumpco-surface); }



/* Botón «+ Nuevo formulario» estilo Gmail arriba en el menú lateral (Desktop y Drawer) */

.drawer > .drawer-compose {

  flex: none;

  display: inline-flex;

  align-items: center;

  gap: 12px;

  width: fit-content;

  max-width: calc(100% - 24px);

  min-height: 52px;

  margin: 12px 12px 8px;

  padding: 0 20px 0 16px;

  border: 0;

  border-radius: 16px;

  color: var(--pumpco-navy);

  background: var(--pumpco-yellow-bright);

  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);

  font-size: .92rem;

  font-weight: 800;

  letter-spacing: .01em;

  cursor: pointer;

  transition: transform .15s ease, box-shadow .18s ease, background-color .15s ease;

}

.drawer > .drawer-compose[hidden] { display: none !important; }

.drawer > .drawer-compose:hover,

.drawer > .drawer-compose:focus-visible {

  background: #ffd426;

  box-shadow: 0 6px 20px rgba(242, 196, 0, .38);

  transform: translateY(-1px);

  outline: none;

}

.drawer > .drawer-compose:active { transform: scale(.98); }

.drawer-compose-icon {

  flex: none;

  width: 22px;

  height: 22px;

  fill: none;

  stroke: currentColor;

  stroke-width: 2.5;

  stroke-linecap: round;

  stroke-linejoin: round;

}

.drawer-compose-label {

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}

@media (min-width: 1024px) {

  .sidebar-collapsed:not(.mobile-shell) .drawer > .drawer-compose {

    justify-content: center;

    width: 48px;

    min-height: 48px;

    margin: 12px auto 6px;

    padding: 0;

    border-radius: 16px;

  }

  .sidebar-collapsed:not(.mobile-shell) .drawer-compose-label {

    display: none;

  }

}



/* ===== DataTables estilo Excel + Version Control (filtro/orden por columna y colapso inline + / −) ===== */

.data-table-wrap,

#dashboard-reports .data-table-wrap,

#view-my-reports .data-table-wrap,

.campaign-table-pane .data-table-wrap,

#view-validation .data-table-wrap,

[data-subpage-panel="parcels"] .data-table-wrap {

  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;

  max-width: 100% !important;

  border: 1px solid var(--pumpco-border-soft) !important;

  border-radius: 12px !important;

  background: var(--pumpco-surface) !important;

}

.vc-excel-datatable.data-table {

  display: table !important;

  width: 100% !important;

  min-width: 0 !important;

  border-collapse: collapse !important;

  table-layout: auto !important;

  background: var(--pumpco-surface) !important;

}

.vc-excel-datatable.data-table thead {

  display: table-header-group !important;

}

.vc-excel-datatable.data-table tbody {

  display: table-row-group !important;

}

.vc-excel-datatable.data-table tr,

.vc-excel-datatable.data-table thead tr,

.vc-excel-datatable.data-table tbody tr {

  display: table-row !important;

  width: auto !important;

  margin: 0 !important;

  padding: 0 !important;

  border: 0 !important;

  border-radius: 0 !important;

  box-shadow: none !important;

}

.vc-excel-datatable.data-table tbody tr[hidden] {

  display: none !important;

}

.vc-excel-datatable.data-table th,

.vc-excel-datatable.data-table td {

  display: table-cell !important;

  width: auto !important;

  padding: 10px 10px !important;

  border-bottom: 1px solid #eef0f5 !important;

  vertical-align: middle !important;

  overflow-wrap: break-word !important;

  word-break: normal !important;

}

.vc-excel-datatable.data-table thead th {

  font-size: .68rem !important;

  font-weight: 800 !important;

  letter-spacing: .05em !important;

  text-transform: uppercase !important;

  color: #5f6f85 !important;

  background-color: #f8fafc !important;

  border-bottom: 1px solid #e2e8f0 !important;

  white-space: nowrap !important;

  word-break: normal !important;

  overflow-wrap: normal !important;

  user-select: none;

}

.vc-excel-datatable.data-table .dt-column-title {

  white-space: nowrap !important;

  word-break: normal !important;

  overflow-wrap: normal !important;

}

.vc-excel-datatable.data-table .table-action,

.vc-excel-datatable.data-table .status-badge,

.vc-excel-datatable.data-table .priority-badge,

.vc-excel-datatable.data-table .company-badge,

.vc-excel-datatable.data-table .stage-badge {

  white-space: nowrap !important;

  word-break: normal !important;

  overflow-wrap: normal !important;

}

.vc-excel-datatable.data-table td.dash-actions,

.vc-excel-datatable.data-table td.camp-actions,

.vc-excel-datatable.data-table td.my-actions {

  width: 1% !important;

  white-space: nowrap !important;

  text-align: right;

}

.vc-excel-datatable.data-table th.dtr-hidden-col,

.vc-excel-datatable.data-table td.dtr-hidden-col,

.vc-excel-datatable.data-table th[hidden],

.vc-excel-datatable.data-table td[hidden] {

  display: none !important;

}

.vc-excel-datatable.data-table tbody td:not(.dtr-control)::before {

  content: none !important;

}



/* Cabecera con título y botón embudo estilo Excel */

.vc-th-inner {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 6px;

  width: 100%;

}

.vc-th-inner .dt-column-title {

  cursor: pointer;

  line-height: 1.25;

}

.vc-th-inner .dt-column-title:hover {

  color: #101923;

}

.vc-excel-filter-btn {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 3px;

  min-width: 24px;

  min-height: 22px;

  height: 22px;

  margin: 0;

  padding: 0 5px;

  border: 1px solid #cbd5e1;

  border-radius: 5px;

  background-color: #ffffff;

  color: #475569;

  font-size: .68rem;

  font-weight: 800;

  line-height: 1;

  cursor: pointer;

  flex-shrink: 0;

  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;

}

.vc-excel-filter-btn:hover,

.vc-excel-filter-btn.is-open {

  border-color: #101923;

  background-color: #f1f5f9;

  color: #101923;

}

.vc-excel-filter-btn.is-sorted {

  border-color: #101923;

  color: #101923;

  background-color: #e2e8f0;

}

.vc-excel-filter-btn.is-filtered {

  border-color: #d4aa00;

  background-color: #f2c400;

  color: #101923;

  box-shadow: 0 1px 4px rgba(242, 196, 0, .35);

}

.vc-excel-filter-btn svg {

  width: 11px;

  height: 11px;

  fill: currentColor;

  flex-shrink: 0;

}



/* Botón + / − de colapso responsivo (igual a DataTables Responsive en version_control.html) */

.vc-excel-datatable.data-table tbody td::before {

  content: none !important;

}

.vc-excel-datatable.dtr-inline.collapsed > tbody > tr > td.dtr-control {

  position: relative !important;

  padding-left: 2.35rem !important;

  cursor: pointer;

}

.vc-excel-datatable .dtr-toggle-btn {

  position: absolute !important;

  top: 50% !important;

  left: .55rem !important;

  transform: translateY(-50%);

  width: 22px !important;

  height: 22px !important;

  min-width: 22px !important;

  min-height: 22px !important;

  margin: 0 !important;

  padding: 0 !important;

  border: 1px solid #1b2a49 !important;

  border-radius: 50% !important;

  background-color: #1b2a49 !important;

  color: #ffffff !important;

  font-size: .88rem !important;

  font-weight: 800 !important;

  line-height: 20px !important;

  text-align: center !important;

  box-shadow: 0 2px 5px rgba(27, 42, 73, .22);

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  cursor: pointer;

  z-index: 2;

  transition: transform .12s ease, background-color .15s ease, color .15s ease;

}

.vc-excel-datatable .dtr-toggle-btn:hover {

  transform: translateY(-50%) scale(1.08);

}

.vc-excel-datatable .dtr-toggle-btn.is-expanded,

.vc-excel-datatable tr.dtr-expanded .dtr-toggle-btn {

  background-color: #f2c400 !important;

  border-color: #dcb426 !important;

  color: #1b2a49 !important;

}

.vc-excel-datatable > tbody > tr.child td.child {

  background-color: #f8fafc !important;

  padding: .75rem 1.25rem .75rem 2.35rem !important;

}

.vc-excel-datatable ul.dtr-details {

  margin: 0;

  padding: 0;

  list-style: none;

  display: flex;

  flex-wrap: wrap;

  gap: .65rem 1.5rem;

}

.vc-excel-datatable ul.dtr-details > li {

  border-bottom: 0 !important;

  padding: .15rem 0 !important;

  display: inline-flex;

  flex-wrap: wrap;

  align-items: center;

  gap: .4rem;

}

.vc-excel-datatable ul.dtr-details .dtr-title {

  font-size: .7rem;

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: .04em;

  color: #5f6f85;

}

.vc-excel-datatable ul.dtr-details .dtr-title::after {

  content: ":";

}

.vc-excel-datatable ul.dtr-details .dtr-data {

  font-size: .82rem;

  color: #101923;

}



/* Barra superior de filtros activos de columna */

.vc-active-filters-bar {

  display: flex;

  flex-wrap: wrap;

  align-items: center;

  justify-content: space-between;

  gap: 8px 12px;

  margin-bottom: 10px;

  padding: 8px 12px;

  border: 1px solid #cbd5e1;

  border-left: 4px solid #f2c400;

  border-radius: 10px;

  background: #ffffff;

  font-size: .8rem;

}

.vc-active-filters-bar[hidden] {

  display: none !important;

}

.vc-filter-count {

  color: #475569;

}

.vc-filter-chips {

  display: flex;

  flex-wrap: wrap;

  gap: 6px;

  flex: 1 1 auto;

}

.vc-filter-chip {

  display: inline-flex;

  align-items: center;

  gap: 5px;

  padding: 3px 8px;

  border: 1px solid #e2e8f0;

  border-radius: 999px;

  background: #fffbeb;

  color: #101923;

  font-size: .75rem;

}

.vc-filter-chip button {

  min-height: 0;

  width: 18px;

  height: 18px;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background: rgba(16, 25, 35, .1);

  color: #101923;

  font-size: .85rem;

  font-weight: 800;

  line-height: 1;

  cursor: pointer;

}

.vc-filter-chip button:hover {

  background: #dc2626;

  color: white;

}

.vc-clear-all-btn {

  min-height: 28px;

  padding: 4px 10px;

  border: 1px solid #fca5a5;

  border-radius: 6px;

  background: #fff5f5;

  color: #b91c1c;

  font-size: .74rem;

  font-weight: 800;

  cursor: pointer;

}

.vc-clear-all-btn:hover {

  background: #fee2e2;

}



/* Menú flotante estilo Excel (.vc-excel-menu) */

.vc-excel-menu {

  position: fixed;

  z-index: 2050;

  width: 330px;

  min-width: 260px;

  max-width: min(560px, 94vw);

  min-height: 290px;

  max-height: min(80vh, 600px);

  display: flex;

  flex-direction: column;

  resize: both;

  overflow: hidden;

  background: #ffffff;

  border: 1px solid #94a3b8;

  border-radius: 12px;

  box-shadow: 0 16px 38px rgba(16, 25, 35, .24);

  padding: 10px;

  color: #101923;

  font-size: .82rem;

}

.vc-excel-menu[hidden] {

  display: none !important;

}

.vc-excel-menu-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 8px;

  padding: 6px 8px;

  margin: -4px -4px 8px;

  background: #f1f5f9;

  border: 1px solid #e2e8f0;

  border-radius: 8px;

  cursor: grab;

  user-select: none;

  touch-action: none;

}

.vc-excel-menu-header:active,

.vc-excel-menu.is-dragging .vc-excel-menu-header {

  cursor: grabbing;

  background: #e2e8f0;

}

.vc-excel-menu-title {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  font-size: .74rem;

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: .05em;

  color: #101923;

}

.vc-excel-drag-grip {

  color: #64748b;

  font-size: .9rem;

  line-height: 1;

}

.vc-excel-reset-btn {

  min-height: 0;

  padding: 2px 6px;

  border: 0;

  background: transparent;

  color: #101923;

  font-size: .72rem;

  font-weight: 800;

  cursor: pointer;

}

.vc-excel-reset-btn:disabled {

  opacity: .4;

  cursor: default;

}

.vc-excel-sort-group {

  display: flex;

  flex-direction: column;

  gap: 4px;

  padding-bottom: 8px;

  margin-bottom: 8px;

  border-bottom: 1px solid #e2e8f0;

}

.vc-excel-sort-btn {

  display: flex;

  align-items: center;

  gap: 8px;

  width: 100%;

  min-height: 32px;

  padding: 6px 8px;

  border: 1px solid transparent;

  border-radius: 7px;

  background: transparent;

  color: #1e293b;

  font-size: .8rem;

  font-weight: 600;

  text-align: left;

  cursor: pointer;

}

.vc-excel-sort-btn:hover {

  background-color: #f1f5f9;

}

.vc-excel-sort-btn.active {

  background-color: rgba(242, 196, 0, .2);

  border-color: #f2c400;

  color: #101923;

  font-weight: 700;

}

.vc-excel-sort-badge {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-width: 28px;

  height: 20px;

  padding: 0 4px;

  border-radius: 4px;

  background: #e2e8f0;

  color: #101923;

  font-size: .68rem;

  font-weight: 800;

}

.vc-excel-sort-btn.active .vc-excel-sort-badge {

  background: #101923;

  color: #f2c400;

}

.vc-excel-search-input {

  width: 100%;

  min-height: 34px !important;

  height: 34px;

  padding: 6px 10px !important;

  border: 1px solid #94a3b8 !important;

  border-radius: 7px !important;

  font-size: .8rem !important;

  margin-bottom: 8px;

  background-color: #f8fafc !important;

  color: #101923 !important;

}

.vc-excel-search-input:focus {

  background-color: #ffffff !important;

  border-color: #f2c400 !important;

  box-shadow: 0 0 0 3px rgba(242, 196, 0, .25) !important;

  outline: none !important;

}

.vc-excel-values-box {

  border: 1px solid #e2e8f0;

  border-radius: 7px;

  background: #f8fafc;

  flex: 1 1 auto;

  min-height: 120px;

  max-height: 260px;

  overflow-y: auto;

  padding: 5px;

  margin-bottom: 8px;

}

.vc-excel-value-row {

  display: flex !important;

  flex-direction: row !important;

  align-items: flex-start !important;

  justify-content: space-between !important;

  gap: 8px !important;

  padding: 5px 6px;

  border-radius: 5px;

  cursor: pointer;

  user-select: none;

  margin: 0;

  font-weight: 500;

}

.vc-excel-value-row:hover {

  background-color: #e2e8f0;

}

.vc-excel-value-row.select-all-row {

  font-weight: 700;

  border-bottom: 1px solid #e2e8f0;

  margin-bottom: 4px;

  padding-bottom: 6px;

}

.vc-excel-value-left {

  display: flex;

  align-items: flex-start;

  gap: 8px;

  min-width: 0;

  flex: 1 1 auto;

}

.vc-excel-value-left input[type="checkbox"] {

  width: 15px !important;

  height: 15px !important;

  min-height: 0 !important;

  margin: 2px 0 0 !important;

  accent-color: #101923;

  cursor: pointer;

  flex-shrink: 0;

}

.vc-excel-value-label {

  white-space: normal;

  word-break: break-word;

  line-height: 1.3;

  font-size: .78rem;

  color: #1e293b;

}

.vc-excel-value-count {

  font-size: .7rem;

  color: #64748b;

  font-weight: 700;

  flex-shrink: 0;

}

.vc-excel-empty {

  padding: 12px;

  text-align: center;

  color: #64748b;

  font-size: .78rem;

}

.vc-excel-menu-footer {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 8px;

}

.vc-excel-menu-footer .outline-button,

.vc-excel-menu-footer .primary-button {

  flex: 1 1 0;

  min-height: 34px;

  margin: 0;

  padding: 0 10px;

  font-size: .78rem;

}



.vc-excel-header-actions {

  display: inline-flex;

  align-items: center;

  gap: 4px;

}

.vc-excel-close-btn {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  width: 24px !important;

  height: 24px !important;

  min-height: 24px !important;

  margin: 0 !important;

  padding: 0 !important;

  border: 1px solid #cbd5e1 !important;

  border-radius: 6px !important;

  background: #ffffff !important;

  color: #475569 !important;

  font-size: 1rem !important;

  font-weight: 800 !important;

  line-height: 1 !important;

  cursor: pointer;

}

.vc-excel-close-btn:hover {

  background: #fee2e2 !important;

  border-color: #fca5a5 !important;

  color: #b91c1c !important;

}

/* ===== Buscador superior y Recibidos estilo Gmail (Desktop y Mobile) ===== */

.topbar .search {

  display: flex;

  align-items: center;

  gap: 8px;

  flex: 1 1 320px;

  max-width: 680px;

  min-width: 0;

  min-height: 46px;

  height: 46px;

  margin: 0 auto 0 12px;

  padding: 0 8px 0 16px;

  border: 1px solid rgba(255, 255, 255, .16);

  border-radius: 999px;

  color: rgba(255, 255, 255, .88);

  background: rgba(255, 255, 255, .12);

  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;

}

.topbar .search:hover {

  background: rgba(255, 255, 255, .18);

  border-color: rgba(255, 255, 255, .26);

}

.topbar .search:focus-within {

  background: #ffffff;

  color: #101923;

  border-color: #ffffff;

  box-shadow: 0 4px 18px rgba(0, 0, 0, .28);

}

.topbar .search .search-icon {

  flex-shrink: 0;

  width: 20px;

  height: 20px;

  color: rgba(255, 255, 255, .78);

  transition: color .16s ease;

}

.topbar .search:focus-within .search-icon {

  color: #475569;

}

.topbar .search input {

  flex: 1 1 auto;

  width: 100%;

  min-width: 0;

  min-height: 40px;

  height: 40px;

  padding: 0 4px;

  border: 0 !important;

  border-radius: 0;

  outline: none !important;

  box-shadow: none !important;

  color: #ffffff;

  background: transparent !important;

  font-size: .92rem;

  font-weight: 500;

}

.topbar .search input::-webkit-search-cancel-button,

.topbar .search input::-webkit-search-decoration {

  -webkit-appearance: none;

  appearance: none;

  display: none;

}

.topbar .search input::placeholder {

  color: rgba(255, 255, 255, .74);

}

.topbar .search:focus-within input {

  color: #101923;

}

.topbar .search:focus-within input::placeholder {

  color: #64748b;

}

.topbar .search .search-icon-btn {

  display: inline-grid;

  place-items: center;

  flex-shrink: 0;

  width: 34px;

  height: 34px;

  min-height: 34px;

  margin: 0;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background: transparent;

  color: rgba(255, 255, 255, .82);

  font-size: 1.25rem;

  line-height: 1;

  cursor: pointer;

  transition: background-color .15s ease, color .15s ease;

}

.topbar .search .search-icon-btn[hidden] {

  display: none !important;

}

.topbar .search .search-icon-btn:hover {

  background: rgba(255, 255, 255, .16);

  color: #ffffff;

}

.topbar .search:focus-within .search-icon-btn {

  color: #475569;

}

.topbar .search:focus-within .search-icon-btn:hover {

  background: #f1f5f9;

  color: #101923;

}

.topbar .search .search-icon-btn.active {

  background: rgba(242, 196, 0, .26);

  color: #f2c400;

}

.topbar .search:focus-within .search-icon-btn.active {

  background: #fef3c7;

  color: #92400e;

}



@media (max-width: 760px) {

  .topbar {

    gap: 8px;

    padding-right: 10px;

    padding-left: 10px;

  }

  .app-identity .app-divider,

  .app-identity .app-product {

    display: none;

  }

  .app-identity strong {

    display: none;

  }

  .app-identity img {

    flex-shrink: 0;

  }

  .topbar .search {

    min-width: 0;

    min-height: 40px;

    height: 40px;

    margin: 0 0 0 6px;

    padding: 0 6px 0 12px;

    max-width: none;

  }

  .topbar .search input {

    min-height: 36px;

    height: 36px;

    font-size: .85rem;

  }

  .topbar .search .search-icon-btn {

    width: 30px;

    height: 30px;

    min-height: 30px;

  }

}



body.mobile-shell .app-identity .app-divider,

body.mobile-shell .app-identity .app-product {

  display: none;

}

body.mobile-shell .app-identity strong {

  display: none;

}

body.mobile-shell .topbar .search {

  min-width: 0;

  min-height: 40px;

  height: 40px;

  margin: 0 0 0 6px;

  padding: 0 6px 0 12px;

  max-width: none;

}



/* ===== Vista Recibidos estilo Bandeja de Entrada de Gmail ===== */

#view-alerts.gmail-inbox-view {

  padding-top: 16px;

}

#view-alerts.gmail-inbox-view > .message:empty {

  display: none;

}

#dashboard-reports.gmail-inbox-surface {

  margin-top: 0;

  background: #ffffff;

  border: 1px solid #dbe3ee;

  border-radius: 16px;

  box-shadow: 0 4px 20px rgba(7, 22, 36, .06);

  overflow: hidden;

}

#dashboard-reports.gmail-inbox-surface > #reports-message {

  margin: 0;

  padding: 0 16px;

}

#dashboard-reports.gmail-inbox-surface > #reports-message:not(:empty) {

  padding: 10px 16px;

  border-bottom: 1px solid #eef2f6;

}

#dashboard-reports.gmail-inbox-surface > .vc-active-filters-bar {

  margin: 8px 12px;

}

#dashboard-reports.gmail-inbox-surface > .data-table-wrap {

  border: 0 !important;

  border-radius: 0 !important;

  box-shadow: none !important;

}

#dashboard-reports.gmail-inbox-surface .dashboard-reports-table tbody tr.dash-row {

  cursor: pointer;

  transition: background-color .12s ease, box-shadow .12s ease;

}

#dashboard-reports.gmail-inbox-surface .dashboard-reports-table tbody tr.dash-row:hover {

  background-color: #f2f6fc !important;

  box-shadow: inset 3px 0 0 var(--pumpco-yellow-bright) !important;

}



/* Barra de acciones superior de Recibidos (estilo Gmail) */

.gmail-toolbar {

  display: flex;

  flex-wrap: wrap;

  align-items: center;

  justify-content: space-between;

  gap: 8px 12px;

  min-height: 52px;

  padding: 8px 14px;

  border-bottom: 1px solid #edf2f7;

  background: #ffffff;

}

.gmail-toolbar-left,

.gmail-toolbar-right {

  display: flex;

  align-items: center;

  gap: 8px;

}

.gmail-toolbar-left {

  flex-wrap: wrap;

  min-width: 0;

}

.gmail-toolbar-right {

  margin-left: auto;

}

.gmail-inbox-title {

  margin: 0 4px 0 2px !important;

  font-size: 1.15rem !important;

  font-weight: 800 !important;

  color: #101923 !important;

  letter-spacing: -.02em;

}

.gmail-inbox-title::after {

  display: none !important;

}

.gmail-icon-btn {

  display: inline-grid;

  place-items: center;

  width: 36px;

  height: 36px;

  min-height: 36px;

  margin: 0;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background: transparent;

  color: #475569;

  cursor: pointer;

  transition: background-color .15s ease, color .15s ease;

}

.gmail-icon-btn svg {

  width: 18px;

  height: 18px;

  fill: none;

  stroke: currentColor;

  stroke-width: 2;

  stroke-linecap: round;

  stroke-linejoin: round;

}

.gmail-icon-btn:hover:not(:disabled) {

  background: #f1f5f9;

  color: #101923;

}

.gmail-icon-btn:disabled {

  opacity: .38;

  cursor: default;

}

.gmail-pill-btn {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  min-height: 34px;

  height: 34px;

  padding: 0 12px;

  border: 1px solid #dbe3ee;

  border-radius: 999px;

  background: #f8fafc;

  color: #1e293b;

  font-size: .78rem;

  font-weight: 700;

  white-space: nowrap;

  cursor: pointer;

  transition: background-color .15s ease, border-color .15s ease, color .15s ease;

}

.gmail-pill-btn svg {

  width: 15px;

  height: 15px;

  fill: none;

  stroke: currentColor;

  stroke-width: 2;

  stroke-linecap: round;

  stroke-linejoin: round;

}

.gmail-pill-btn:hover:not(:disabled),

.gmail-pill-btn.active {

  background: #fffbeb;

  border-color: var(--pumpco-yellow);

  color: #101923;

}

.gmail-pagination-count {

  color: #5f6f85;

  font-size: .78rem;

  font-weight: 600;

  white-space: nowrap;

  font-variant-numeric: tabular-nums;

}

.gmail-pagination-arrows {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.gmail-inline-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 440px;
  height: 34px;
  padding: 0 10px 0 32px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #f8fafc;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.gmail-inline-search:focus-within {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.gmail-inline-search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.gmail-inline-search input {
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 20px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: .8rem;
  color: #101923;
  outline: none;
}

.gmail-inline-search-clear {
  position: absolute;
  right: 6px;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.gmail-inline-search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.gmail-page-size-wrap {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
}

.gmail-page-size-select {
  height: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 0 24px 0 10px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 999px !important;
  background-color: #f8fafc !important;
  color: #334155 !important;
  font-size: .76rem !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.gmail-bottom-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 16px;
  border-top: 1px solid #edf2f7;
  background: #fafbfc;
}

.gmail-bottom-pager-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gmail-pill-btn:disabled {
  opacity: .42;
  cursor: default;
}

.report-filter-buttons {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.dashboard-reports.is-loading #reports-table-body {
  opacity: .55;
  transition: opacity .15s ease;
}



/* Pestañas de categorías estilo Gmail (Principal, Recibidos hoy, Prioridad crítica, En firma, Firmados) */

.gmail-category-tabs {

  display: flex;

  flex-wrap: wrap;

  align-items: stretch;

  overflow-x: visible;

  border-bottom: 1px solid #e2e8f0;

  background: #ffffff;

  padding: 0 8px;

  gap: 2px;

}

.gmail-cat-tab {

  position: relative;

  display: inline-flex;

  align-items: center;

  gap: 8px;

  min-height: 48px;

  padding: 0 16px;

  border: 0;

  border-radius: 8px 8px 0 0;

  background: transparent;

  color: #5f6f85;

  font-size: .83rem;

  font-weight: 700;

  white-space: nowrap;

  cursor: pointer;

  transition: background-color .15s ease, color .15s ease;

}

.gmail-cat-tab svg {

  flex-shrink: 0;

  width: 17px;

  height: 17px;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.9;

  stroke-linecap: round;

  stroke-linejoin: round;

}

.gmail-cat-tab:hover {

  background: #f8fafc;

  color: #101923;

}

.gmail-cat-tab.active {

  color: #0b57d0;

}

.gmail-cat-tab.active::after {

  content: "";

  position: absolute;

  right: 12px;

  bottom: 0;

  left: 12px;

  height: 3px;

  border-radius: 3px 3px 0 0;

  background: #0b57d0;

}

.gmail-cat-badge {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-width: 22px;

  height: 20px;

  padding: 0 6px;

  border-radius: 999px;

  background: #e2e8f0;

  color: #334155;

  font-size: .71rem;

  font-weight: 800;

  font-variant-numeric: tabular-nums;

}

.gmail-cat-tab.active .gmail-cat-badge {

  background: #d3e3fd;

  color: #041e49;

}

.gmail-cat-badge.badge-critical {

  background: #fee2e2;

  color: #991b1b;

}

.gmail-cat-badge.badge-warn {

  background: #fef3c7;

  color: #92400e;

}

.gmail-cat-badge.badge-ok {

  background: #dcfce7;

  color: #166534;

}

.gmail-status-pill {

  display: inline-flex;

  align-items: center;

  gap: 5px;

  align-self: center;

  margin-left: 6px;

  padding: 4px 10px;

  border-radius: 999px;

  background: #f8fafc;

  border: 1px solid #e2e8f0;

  color: #64748b;

  font-size: .73rem;

  font-weight: 700;

  white-space: nowrap;

}

.gmail-status-pill:first-of-type {

  margin-left: auto;

}

.gmail-status-pill[hidden] {

  display: none !important;

}

.gmail-status-pill strong {

  color: #101923;

  font-weight: 800;

}



/* Panel desplegable de búsqueda/filtros avanzados dentro de Recibidos */

#reports-filter-form.gmail-filter-drawer {

  margin: 0;

  padding: 14px 16px;

  border: 0;

  border-bottom: 1px solid #e2e8f0;

  border-radius: 0;

  background: #f8fafc;

  box-shadow: none;

}

#reports-filter-form.gmail-filter-drawer[hidden] {

  display: none !important;

}



/* Panel secundario colapsable debajo de la bandeja (Alertas y Resumen por empresa) */

.gmail-secondary-panel {

  margin-top: 16px;

  border: 1px solid #dbe3ee;

  border-radius: 14px;

  background: #ffffff;

  overflow: hidden;

}

.gmail-secondary-summary {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 12px 16px;

  cursor: pointer;

  color: #101923;

  background: #f8fafc;

  font-size: .88rem;

  font-weight: 800;

  user-select: none;

}

.gmail-secondary-panel[open] .gmail-secondary-summary {

  border-bottom: 1px solid #e2e8f0;

}

.gmail-secondary-body {

  padding: 4px 16px 16px;

}



@media (max-width: 900px) {

  .gmail-category-tabs {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));

    gap: 6px;

    padding: 8px 10px;

    background: #f8fafc;

  }

  .gmail-cat-tab {

    justify-content: space-between;

    min-height: 36px;

    padding: 5px 10px;

    border: 1px solid #dbe3ee;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: .76rem;

    gap: 6px;

  }

  .gmail-cat-tab svg {

    width: 15px;

    height: 15px;

  }

  .gmail-cat-tab .gmail-cat-label {

    flex: 1 1 auto;

    text-align: left;

    overflow: hidden;

    text-overflow: ellipsis;

  }

  .gmail-cat-tab.active {

    background: #e8f0fe;

    border-color: #0b57d0;

    color: #0b57d0;

    box-shadow: 0 1px 3px rgba(11, 87, 208, .12);

  }

  .gmail-cat-tab.active::after {

    display: none;

  }

  .gmail-status-pill,

  .gmail-status-pill:first-of-type {

    margin-left: 0;

    justify-content: space-between;

    border-radius: 10px;

    padding: 5px 10px;

  }

}



body.mobile-shell .gmail-category-tabs {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));

  gap: 6px;

  padding: 8px 10px;

  background: #f8fafc;

}

body.mobile-shell .gmail-cat-tab {

  justify-content: space-between;

  min-height: 36px;

  padding: 5px 10px;

  border: 1px solid #dbe3ee;

  border-radius: 10px;

  background: #ffffff;

  color: #334155;

  font-size: .76rem;

  gap: 6px;

}

body.mobile-shell .gmail-cat-tab svg {

  width: 15px;

  height: 15px;

}

body.mobile-shell .gmail-cat-tab .gmail-cat-label {

  flex: 1 1 auto;

  text-align: left;

  overflow: hidden;

  text-overflow: ellipsis;

}

body.mobile-shell .gmail-cat-tab.active {

  background: #e8f0fe;

  border-color: #0b57d0;

  color: #0b57d0;

  box-shadow: 0 1px 3px rgba(11, 87, 208, .12);

}

body.mobile-shell .gmail-cat-tab.active::after {

  display: none;

}

body.mobile-shell .gmail-status-pill,

body.mobile-shell .gmail-status-pill:first-of-type {

  margin-left: 0;

  justify-content: space-between;

  border-radius: 10px;

  padding: 5px 10px;

}



@media (max-width: 680px) {

  #view-alerts.gmail-inbox-view {

    padding: 10px 8px 24px;

  }

  .gmail-toolbar {

    padding: 8px 10px;

  }

  .gmail-pill-btn span {

    display: none;

  }

  .gmail-pill-btn {

    padding: 0 9px;

  }

}

/* ===== Banner de confirmación de actualización OTA (APK Cascarón / Live Update) ===== */

.ota-update-banner {

  position: fixed;

  right: 16px;

  bottom: calc(var(--bottom-nav-height, 66px) + 16px);

  left: 16px;

  z-index: 3000;

  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 12px 14px;

  max-width: 580px;

  margin: 0 auto;

  padding: 14px 16px;

  border: 1px solid #101923;

  border-left: 5px solid var(--pumpco-yellow-bright);

  border-radius: 16px;

  background: #101923;

  color: #ffffff;

  box-shadow: 0 18px 42px rgba(7, 22, 36, .42);

}

.ota-update-banner[hidden] {

  display: none !important;

}

.ota-update-icon {

  display: grid;

  place-items: center;

  flex-shrink: 0;

  width: 40px;

  height: 40px;

  border-radius: 12px;

  background: rgba(242, 196, 0, .18);

  color: var(--pumpco-yellow-bright);

}

.ota-update-icon svg {

  width: 22px;

  height: 22px;

  fill: none;

  stroke: currentColor;

  stroke-width: 2.2;

  stroke-linecap: round;

  stroke-linejoin: round;

}

.ota-update-content {

  flex: 1 1 220px;

  min-width: 0;

}

.ota-update-content strong {

  display: block;

  color: #ffffff;

  font-size: .92rem;

  font-weight: 800;

}

.ota-update-content p {

  margin: 3px 0 0;

  color: #cbd5e1;

  font-size: .8rem;

  line-height: 1.35;

}

.ota-update-actions {

  display: flex;

  align-items: center;

  gap: 8px;

  margin-left: auto;

}

.ota-update-actions .outline-button {

  min-height: 36px;

  padding: 0 12px;

  border-color: rgba(255, 255, 255, .28);

  background: transparent;

  color: #e2e8f0;

  font-size: .78rem;

}

.ota-update-actions .outline-button:hover {

  border-color: #ffffff;

  color: #ffffff;

}

.ota-update-actions .primary-button {

  min-height: 36px;

  padding: 0 14px;

  border-radius: 10px;

  background: var(--pumpco-yellow-bright);

  color: #101923;

  font-size: .8rem;

  font-weight: 900;

}

.ota-update-actions .primary-button:hover:not(:disabled) {

  background: #ffd426;

}

@media (min-width: 1024px) {

  body:not(.mobile-shell) .ota-update-banner {

    right: 24px;

    bottom: 24px;

    left: auto;

    margin: 0;

  }

}



/* Visor de reporte: acciones (PDF y firma) arriba y archivos (adjuntos y SharePoint) en una lista. */
.report-actions-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--pumpco-border-soft); }
.report-actions-bar .signature-actions { display: contents; }
.report-actions-bar .signature-actions[hidden] { display: none; }
.report-actions-bar button { min-height: 40px; margin: 0; padding: 0 14px; font-size: .86rem; }
.report-dialog .report-actions-bar + .message:empty { display: none; }
.report-files { display: grid; gap: 10px; margin: 14px 0; }
.report-files:not(:has(> :not([hidden]))) { display: none; }
.report-file-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.report-file-list[hidden] { display: none !important; }
.report-file-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 12px 6px 6px; border: 1px solid var(--pumpco-border); border-radius: 10px; background: var(--pumpco-surface); color: var(--pumpco-text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.report-file-row[hidden] { display: none !important; }
.report-file-row:hover { border-color: var(--pumpco-blue); background: #f5f8fc; }
.report-file-row:disabled { opacity: .6; cursor: wait; }
.report-file-ext { display: grid; flex: none; place-items: center; min-width: 44px; height: 32px; padding: 0 6px; border-radius: 7px; background: var(--pumpco-border-soft); color: var(--pumpco-blue); font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.report-file-name { display: grid; flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.report-file-name small { color: var(--pumpco-muted); font-size: .76rem; font-weight: 400; }
.report-file-action { flex: none; color: var(--pumpco-blue); font-size: .8rem; font-weight: 800; }
.report-sharepoint-box { display: grid; gap: 10px; padding: 12px; border: 1px solid #bae6fd; border-radius: 12px; background: #f0f9ff; }
.report-sp-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.report-sp-title { display: grid; gap: 2px; min-width: 0; }
.report-sp-title .eyebrow { margin: 0; color: #0369a1; font-weight: 800; }
.report-sp-path { color: #0c4a6e; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; overflow-wrap: anywhere; }
.report-sp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.report-sp-btn { display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 0 12px; font-size: .8rem; text-decoration: none; }
.report-sp-btn[hidden],
.report-sp-status[hidden] {
  display: none !important;
}
.report-sp-status { margin: 0; color: #0369a1; font-size: .83rem; font-weight: 500; overflow-wrap: anywhere; }
.report-sp-status[data-tone="success"] { color: #15803d; }
.report-sp-status[data-tone="error"] { color: #b91c1c; }
@media (max-width: 560px) {
  .report-actions-bar button { flex: 1 1 calc(50% - 4px); }
  .report-actions-bar #report-download-pdf { flex-basis: 100%; }
  .report-sp-actions { width: 100%; }
  .report-sp-actions .report-sp-btn { flex: 1 1 0; justify-content: center; }
}

/* Ajuste móvil para que la tabla de Enviados y todas las tablas entren en el ancho del celular y los botones siempre se puedan tocar */
#view-my-reports,
#view-my-reports section[data-my-reports-panel],
#view-my-reports .data-table-wrap,
.view,
main {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 640px) {
  .vc-excel-datatable.data-table th,
  .vc-excel-datatable.data-table td {
    padding: 8px 6px !important;
    font-size: 0.82rem !important;
  }
  .vc-excel-datatable.data-table thead th,
  .vc-excel-datatable.data-table .dt-column-title {
    white-space: normal !important;
    font-size: 0.64rem !important;
  }
  .vc-excel-datatable.data-table td.my-actions,
  .vc-excel-datatable.data-table td.dash-actions,
  .vc-excel-datatable.data-table td.camp-actions {
    width: auto !important;
    white-space: normal !important;
    text-align: right;
  }
  .vc-excel-datatable.data-table td.my-actions .review-actions,
  .vc-excel-datatable.data-table td.dash-actions .review-actions,
  .vc-excel-datatable.data-table td.camp-actions .review-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 5px !important;
  }
  .vc-excel-datatable.data-table .table-action {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
    min-height: 34px !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* Modal de firma digital Documenso embebida en la app */
/* Casi pantalla completa: el diseño de escritorio de Documenso es ancho y, si no entra, su botón «Completar» queda
   fuera de la vista (fitDocumensoFrame lo achica para que entre). */
.documenso-sign-dialog {
  width: min(1480px, 98vw) !important;
  max-width: 1480px !important;
  height: min(960px, 95vh) !important;
  max-height: 95vh !important;
  padding: 0 !important;
}
.documenso-sign-shell {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 95vh !important;
  padding: 14px 18px !important;
  gap: 10px !important;
}
.documenso-sign-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.documenso-sign-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
/* «Ya firmé» queda inactivo sólo mientras verifica la firma en Documenso. */
.documenso-sign-actions .primary-button:disabled {
  cursor: not-allowed;
  opacity: .5;
  box-shadow: none;
}
.documenso-sign-signers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.documenso-signer-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.documenso-signer-pill.is-active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.documenso-signer-pill.is-signed {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.documenso-sign-frame-wrap {
  flex: 1 1 auto;
  min-height: 480px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}
.documenso-sign-iframe {
  transform-origin: 0 0;
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
  display: block;
}
@media (max-width: 640px) {
  .documenso-sign-dialog {
    width: 98vw !important;
    height: 94vh !important;
  }
  .documenso-sign-shell {
    padding: 10px !important;
  }
}


/* ===== Tablas de Campaña Topográfica y Campaña Geotécnica (Desktop ancho completo + Mobile tarjetas completas) ===== */
.camp-no-report {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
}

@media (min-width: 961px) {
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table th,
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td {
    vertical-align: top !important;
    padding: 12px 12px !important;
  }
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td.camp-activity {
    min-width: 200px;
    max-width: 280px;
  }
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td.camp-pk {
    min-width: 135px;
    white-space: nowrap !important;
  }
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td.camp-status {
    min-width: 185px;
    max-width: 260px;
  }
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td.camp-workflow {
    min-width: 250px;
  }
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td.camp-qa {
    min-width: 155px;
  }
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td.camp-company {
    min-width: 150px;
  }
  body:not(.mobile-shell) .vc-excel-datatable.campaign-responsive-table.data-table td.camp-actions {
    width: 1% !important;
    white-space: nowrap !important;
    text-align: right;
  }
}

@media (max-width: 960px) {
  .campaign-table-pane .data-table-wrap {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table,
  .vc-excel-datatable.campaign-responsive-table.data-table tbody {
    display: block !important;
    width: 100% !important;
    background: transparent !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table thead {
    display: none !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr[hidden] {
    display: none !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-empty,
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.vc-filter-empty-row {
    display: block !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-empty td,
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.vc-filter-empty-row td {
    display: block !important;
    padding: 16px !important;
    border: 1px solid #dce3ee !important;
    border-radius: 14px !important;
    background: #ffffff !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row:not([hidden]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px 12px !important;
    align-items: start !important;
    margin: 0 0 12px 0 !important;
    padding: 14px 16px !important;
    border: 1px solid #dce3ee !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05) !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
    white-space: normal !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td[data-label]::before {
    content: attr(data-label) !important;
    display: block !important;
    font-size: 0.66rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    margin-bottom: 3px !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-activity {
    grid-column: 1 !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-pk {
    grid-column: 2 !important;
    justify-self: end !important;
    text-align: right !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-pk::before {
    text-align: right !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-status,
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-workflow,
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-qa {
    grid-column: 1 / -1 !important;
    padding-top: 8px !important;
    border-top: 1px solid #f1f5f9 !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-company {
    grid-column: 1 !important;
    padding-top: 8px !important;
    border-top: 1px solid #f1f5f9 !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-actions {
    grid-column: 2 !important;
    justify-self: end !important;
    align-self: end !important;
    text-align: right !important;
    padding-top: 8px !important;
    border-top: 1px solid #f1f5f9 !important;
  }
  .vc-excel-datatable.campaign-responsive-table.data-table tbody tr.camp-row td.camp-actions::before {
    text-align: right !important;
  }
}


/* ==========================================================================
   Grabador de Recorrido GPS (Exclusivo APK móvil)
   ========================================================================== */
.legend-gps-track {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: #a855f7;
  box-shadow: 0 0 6px rgba(192, 132, 252, 0.7);
  vertical-align: middle;
}

.gps-tracker-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  animation: gpsPulse 1.8s infinite ease-in-out;
}
.gps-tracker-live-pill[hidden] {
  display: none !important;
}
@keyframes gpsPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.gps-btn-start {
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #ffffff !important;
}
.gps-btn-finish {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

.gps-tracker-send-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}
.gps-tracker-send-box[hidden] {
  display: none !important;
}
.gps-tracker-send-copy strong {
  display: block;
  font-size: 1rem;
  color: #14532d;
  margin-bottom: 4px;
}
.gps-tracker-send-copy p {
  margin: 0;
  font-size: 0.86rem;
  color: #166534;
}
.gps-tracker-send-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gps-btn-send {
  flex: 1 1 260px;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 800;
  background: #15803d !important;
  border-color: #166534 !important;
  color: #ffffff !important;
}

.gps-state-recording {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}
.gps-state-paused {
  background: #fef3c7 !important;
  color: #b45309 !important;
}
.gps-state-finished {
  background: #dcfce7 !important;
  color: #15803d !important;
}

.gps-track-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gps-track-history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.gps-track-history-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gps-track-history-info strong {
  font-size: 0.92rem;
  color: #0f172a;
}
.gps-track-history-info small {
  font-size: 0.78rem;
  color: #64748b;
}

/* --- Login modo campo sin señal --- */
.btn-login-offline {
  width: 100%;
  margin-top: 10px;
  min-height: 46px;
  font-weight: 700;
  border: 1.5px solid #0284c7 !important;
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border-radius: 10px;
}

/* --- Controles flotantes y Banner de Sesión GPS sobre #field-map --- */
.map-panel {
  position: relative;
}

.map-gps-active-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 16;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(239, 68, 68, 0.75);
  color: #f8fafc;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.45);
}
.map-gps-active-banner.is-waypoints {
  border-color: rgba(56, 189, 248, 0.85);
}
.map-gps-active-banner.is-paused {
  border-color: rgba(245, 158, 11, 0.85);
}
.map-gps-active-banner[hidden] {
  display: none !important;
}

.map-gps-banner-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.map-gps-banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
  animation: gpsPulse 1.5s infinite ease-in-out;
  flex-shrink: 0;
}
.map-gps-banner-dot.waypoints {
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.3);
}
.map-gps-banner-info strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}
.map-gps-banner-meta {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fde047;
  font-variant-numeric: tabular-nums;
}

.map-gps-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-gps-banner-btn {
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.map-gps-banner-btn.stop {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
}
.map-gps-banner-btn[hidden] {
  display: none !important;
}

/* Botón flotante grande «Capturar Punto Aquí» (Modo B: Por puntos) */
.map-gps-capture-point-btn {
  position: absolute;
  left: 50%;
  bottom: 138px;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 240px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 1.04rem;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.52);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.map-gps-capture-point-btn:active {
  transform: translateX(-50%) scale(0.96);
}
.map-gps-capture-point-btn[hidden] {
  display: none !important;
}
.map-gps-capture-point-btn small {
  font-size: 0.75rem;
  font-weight: 700;
  color: #e0f2fe;
}
/* Capturando: el botón muestra que está esperando el GPS (spinner + segundos) en lugar de quedar "muerto". */
.map-gps-capture-point-btn.is-busy {
  cursor: progress;
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  animation: map-gps-capture-pulse 1.2s ease-in-out infinite;
}
.map-gps-capture-point-btn.is-busy .map-gps-capture-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  font-size: 0;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: map-gps-spin 0.8s linear infinite;
}
@keyframes map-gps-spin {
  to { transform: rotate(360deg); }
}
@keyframes map-gps-capture-pulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(2, 132, 199, 0.52); }
  50% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.18), 0 12px 28px rgba(2, 132, 199, 0.52); }
}
.gps-btn-waypoint.is-busy {
  cursor: progress;
  opacity: 0.85;
}

/* Toast rápido sobre el mapa */
.map-gps-toast {
  position: absolute;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  z-index: 18;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.4);
  pointer-events: none;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-gps-toast.ok {
  border-color: #22c55e;
  color: #bbf7d0;
}
.map-gps-toast.warn {
  border-color: #f59e0b;
  color: #fde68a;
}
.map-gps-toast.busy {
  border-color: #38bdf8;
  color: #e0f2fe;
}
.map-gps-toast[hidden] {
  display: none !important;
}

/* FAB Group sobre el mapa (Mi ubicación + Iniciar Rastreo) */
.map-gps-fab-group {
  position: absolute;
  right: 14px;
  bottom: 132px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.map-tools-toggle { display: none; }

.map-live-pos-btn,
.map-add-gate-btn,
.map-gps-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.38);
  transition: transform 0.14s ease, background 0.14s ease;
}
.map-live-pos-btn svg,
.map-add-gate-btn svg,
.map-gps-fab svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}
.map-live-pos-btn {
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
}
.map-live-pos-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #93c5fd;
}
.map-gps-fab {
  background: #16a34a;
  color: #ffffff;
  border: 2px solid #bbf7d0;
}
.map-add-gate-btn {
  background: #b7791f;
  border-color: rgba(253, 230, 138, .72);
  color: #fff;
}
.map-add-gate-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-add-gate-btn[hidden] { display: none !important; }
.map-gps-fab[hidden] {
  display: none !important;
}
.map-gps-fab.is-recording {
  background: #dc2626;
  border-color: #fecaca;
  animation: gpsPulse 1.6s infinite ease-in-out;
}
.map-gps-fab.is-waypoints {
  background: #0284c7;
  border-color: #bae6fd;
}

/* --- Modal de Configuración y Gestión de Sesión GPS (#gps-session-dialog) --- */
.gps-session-dialog {
  max-width: 640px;
  width: min(94vw, 640px);
  border-radius: 18px;
  padding: 0;
}
.gps-session-dialog-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gps-session-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.gps-session-dialog-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gps-modal-intro {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
}

.gps-modal-pane[hidden],
.gps-session-dialog [hidden] {
  display: none !important;
}

.gps-modal-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gps-tracker-send-box.is-queued {
  background: #f0f9ff;
  border-color: #7dd3fc;
}
.gps-tracker-send-box.is-queued .gps-tracker-send-copy strong {
  color: #075985;
}
.gps-tracker-send-box.is-queued .gps-tracker-send-copy p {
  color: #0369a1;
}

.gps-tracker-send-box.is-empty {
  background: #fffbeb;
  border-color: #fcd34d;
}
.gps-tracker-send-box.is-empty .gps-tracker-send-copy strong {
  color: #92400e;
}
.gps-tracker-send-box.is-empty .gps-tracker-send-copy p {
  color: #b45309;
}

.gps-modal-toast {
  position: sticky;
  bottom: 10px;
  left: 0;
  right: 0;
  top: auto;
  transform: none;
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  z-index: 30;
}

.gps-mode-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.gps-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 5px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.gps-mode-card.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}
.gps-mode-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 999px;
}
.gps-mode-card strong {
  font-size: 0.95rem;
  color: #0f172a;
}
.gps-mode-card small {
  font-size: 0.79rem;
  color: #475569;
  line-height: 1.35;
}

.gps-session-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.gps-session-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.gps-session-field[hidden] {
  display: none !important;
}
.gps-session-field > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}
.gps-session-field > small {
  font-size: 0.74rem;
  color: #64748b;
}

.gps-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gps-modal-actions[hidden] {
  display: none !important;
}
.gps-modal-actions button {
  flex: 1 1 210px;
  min-height: 46px;
  font-weight: 700;
}
.gps-btn-waypoint {
  background: #0284c7 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
}

.gps-modal-summary-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gps-modal-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gps-modal-summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.gps-modal-summary-stats > div {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gps-modal-summary-stats span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}
.gps-modal-summary-stats strong {
  font-size: 0.96rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.gps-modal-history-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}
.gps-modal-history-section h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #334155;
}

@media (max-width: 720px) {
  .map-gps-fab-group {
    right: 0;
    bottom: 146px;
    padding: 9px 10px 9px 9px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-right: 0;
    border-radius: 18px 0 0 18px;
    background: rgba(8, 17, 30, .58);
    box-shadow: 0 10px 28px rgba(2, 6, 23, .28);
    backdrop-filter: blur(10px);
    transition: padding .18s ease, background .18s ease;
  }
  .map-tools-toggle {
    order: -3;
    display: grid;
    width: 42px;
    height: 48px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 13px;
    color: #f8fafc;
    background: rgba(8, 17, 30, .72);
    box-shadow: 0 6px 18px rgba(2, 6, 23, .3);
    cursor: pointer;
  }
  .map-tools-toggle svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
  .map-gps-fab-group:not(.is-collapsed) .map-tools-toggle svg { transform: rotate(180deg); }
  .map-gps-fab-group.is-collapsed {
    padding: 5px 4px 5px 6px;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(8, 17, 30, .38);
    box-shadow: 0 7px 20px rgba(2, 6, 23, .2);
  }
  .map-gps-fab-group.is-collapsed > :not(.map-tools-toggle) { display: none !important; }
  /* El fondo oscuro no pisa el estado tocado/activo: si no, en el celular el texto (oscuro al tocar) desaparecía. */
  #view-map .map-gps-fab-group:not(.is-collapsed) .map-layers-toggle:not(:hover):not(:focus-visible):not(.is-active),
  #view-map .map-gps-fab-group:not(.is-collapsed) .map-trace-return:not(:hover):not(:focus-visible) { background: rgba(12, 18, 29, .82); }
  #view-map .map-gps-fab-group:not(.is-collapsed) .map-live-pos-btn:not(.active) { background: rgba(15, 23, 42, .82); }
  #view-map .map-gps-fab-group:not(.is-collapsed) .map-add-gate-btn { background: rgba(146, 94, 20, .88); }
  #view-map .map-gps-fab-group:not(.is-collapsed) .map-gps-fab { background: rgba(22, 163, 74, .86); }
  .map-gps-capture-point-btn {
    bottom: 148px;
    min-width: 210px;
    padding: 12px 20px;
    font-size: 0.96rem;
  }
}

/* Mapa de campo: la tarjeta blanca de estado (ubicación / corredor / avance) queda oculta por ahora porque
   tapa mucho mapa en el celular. El texto se sigue actualizando: para volver a mostrarla basta con borrar esta regla. */
#view-map .map-copy { display: none !important; }

/* Sesión GPS activa en el mapa: que los controles no se tapen entre sí en el celular.
   - El aviso (toast) baja debajo del banner superior para no cubrir «Finalizar Sesión».
   - Con «Capturar Punto» visible, los botones «Mi ubicación» / «Sesión Puntos» suben por encima de él.
   - El texto del botón de captura no se parte en dos líneas («Obteniendo ubicación…»). */
#view-map:has(#map-gps-active-banner:not([hidden])) .map-gps-toast { top: 150px; }
#view-map:has(#map-gps-capture-point-btn:not([hidden])) .map-gps-fab-group { bottom: 262px; }
.map-gps-capture-point-btn span { white-space: nowrap; }
.gps-btn-start.is-busy { cursor: progress; opacity: 0.85; }

/* Flujo colaborativo SURING · Borradores compartidos y archivos por partes */
.suring-workflow-banner[hidden],
.company-draft-parts-panel[hidden] {
  display: none !important;
}
.suring-workflow-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}
.suring-workflow-banner-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 280px;
}
.suring-workflow-banner-main strong {
  font-size: 0.92rem;
  color: #1e40af;
}
.suring-workflow-banner-main span {
  font-size: 0.82rem;
  line-height: 1.4;
  color: #1e3a8a;
}
.company-draft-parts-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
}
.company-draft-parts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.company-draft-parts-head strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}
.company-draft-parts-head small {
  display: block;
  font-size: 0.78rem;
  color: #475569;
  margin-top: 2px;
}
.draft-parts-note {
  color: #0369a1;
  font-weight: 500;
}
.draft-conflict-warn {
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
  font-weight: 600;
}


/* ==========================================================================
   Permisos y Habilitaciones · Control de Credenciales y Permisos Activos YPF
   (Contrato #4900122728 · BONATTI SPA · Casilla storage@argpumpco.com.ar)
   Estilos alineados con el sistema visual PCE (--pumpco-navy / --pumpco-blue)
   ========================================================================== */

#view-planning:has([data-subpage-panel="parcels"]:not(.subpage-off)) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 16px;
}

body:has(#view-planning:not([hidden]) [data-subpage-panel="parcels"]:not(.subpage-off)) .breadcrumb {
  padding-left: 16px;
  padding-right: 16px;
}


.status-badge.warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.status-badge.accepted {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* Permisos y Habilitaciones YPF: padrón del día con estado SRC, lista y choferes asignados. */
.ph-workspace {
  --ph-ok: #157347;
  --ph-ok-bg: #e3f4ea;
  --ph-warn: #8a5a00;
  --ph-warn-bg: #fff4cf;
  --ph-warn-dot: #d99a00;
  --ph-bad: #b42318;
  --ph-bad-bg: #fdecea;
  --ph-pending: #5f6f85;
  --ph-pending-bg: #edf2f7;
  position: relative;
  display: grid;
  gap: 20px;
}

.ph-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ph-workspace .tone-ok { color: var(--ph-ok); }
.ph-workspace .tone-warn { color: var(--ph-warn); }
.ph-workspace .tone-bad { color: var(--ph-bad); }
.ph-workspace .tone-muted,
.ph-workspace .tone-pending { color: var(--pumpco-muted); }

.ph-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.ph-title { display: grid; gap: 6px; min-width: 0; }
.ph-title .eyebrow { margin: 0; font-weight: 800; }
.ph-title h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.05; }
.ph-title h2::after { display: block; width: 120px; height: 5px; margin-top: 12px; border-radius: 999px; background: var(--pumpco-yellow-bright); content: ""; }

.ph-head-side { display: grid; gap: 6px; justify-items: end; }
.ph-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ph-head-actions > .primary-button,
.ph-head-actions .ph-menu > summary { min-height: 44px; }
.ph-sync-status { margin: 0; color: var(--pumpco-muted); font-size: .82rem; text-align: right; }

.ph-date {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #bdcad9;
  border-radius: 10px;
  background: var(--pumpco-surface);
  color: var(--pumpco-muted);
  font-size: .88rem;
  white-space: nowrap;
}
.ph-date { position: relative; cursor: pointer; }
.ph-date-display { color: var(--pumpco-text); font-weight: 800; font-size: .95rem; }
.ph-date-icon { color: var(--pumpco-text); flex-shrink: 0; }
.ph-date input.ph-date-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }

.ph-menu { position: relative; }
.ph-menu > summary { display: flex; align-items: center; gap: 6px; padding: 0 14px; list-style: none; cursor: pointer; font-weight: 700; }
.ph-menu > summary::-webkit-details-marker { display: none; }
.ph-menu > summary::after { content: "▾"; font-size: .8em; }
.ph-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  width: min(300px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--pumpco-border);
  border-radius: 12px;
  background: var(--pumpco-surface);
  box-shadow: 0 16px 38px rgba(7, 22, 36, .16);
}
.ph-menu-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pumpco-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ph-menu-item:hover,
.ph-menu-item:focus-visible { background: var(--pumpco-border-soft); }
.ph-menu-field { display: grid; gap: 4px; margin-top: 4px; padding: 10px 12px 6px; border-top: 1px solid var(--pumpco-border-soft); color: var(--pumpco-muted); font-size: .82rem; }

.ph-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ph-notice[hidden] { display: none; }
.ph-notice.ypf-notification-error { border-color: #fca5a5; background: var(--ph-bad-bg); }

.ph-summary { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; }

.ph-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--pumpco-border-soft);
  border-radius: var(--pce-radius);
  background: var(--pumpco-surface);
  box-shadow: 0 12px 34px rgba(7, 22, 36, .045);
}
.ph-status {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--pumpco-border-soft);
  background: transparent;
  color: var(--pumpco-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ph-status:last-child { border-right: 0; }
.ph-status:hover { background: #fffdf4; }
.ph-status[aria-pressed="true"] { background: #fffbeb; box-shadow: inset 0 -4px 0 var(--pumpco-yellow-bright); }
.ph-status > span { display: flex; align-items: center; gap: 6px; color: var(--pumpco-muted); font-size: .82rem; font-weight: 800; }
.ph-status.tone-ok > span { color: var(--ph-ok); }
.ph-status.tone-warn > span { color: var(--ph-warn); }
.ph-status.tone-bad > span { color: var(--ph-bad); }
.ph-status strong { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ph-status small { color: var(--pumpco-muted); font-size: .8rem; }
.ph-dot { width: 9px; height: 9px; border-radius: 999px; background: currentColor; }
.ph-status.tone-warn .ph-dot { background: var(--ph-warn-dot); }

.ph-rollcall {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--pce-radius);
  background: var(--pumpco-navy);
  color: #fff;
}
.ph-rollcall-head { display: flex; justify-content: space-between; gap: 8px; color: #cbd5e1; font-size: .8rem; }
.ph-rollcall-head span:first-child { color: var(--pumpco-yellow-bright); font-weight: 800; letter-spacing: .08em; }
.ph-rollcall-count { margin: 0; color: #cbd5e1; }
.ph-rollcall-count strong { color: #fff; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.ph-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #1e3247; }
.ph-progress > span { display: block; width: 0; height: 100%; background: var(--pumpco-yellow-bright); transition: width .3s ease; }
.ph-progress-light { height: 6px; border-radius: 0; background: var(--pumpco-border); }
.ph-rollcall-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; color: #cbd5e1; font-size: .82rem; }
.ph-rollcall-btn { min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--pumpco-yellow-bright); color: var(--pumpco-navy); font-weight: 800; cursor: pointer; }
.ph-rollcall-btn:disabled { background: #2a3f55; color: #cbd5e1; cursor: default; }

.ph-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ph-search { flex: 1 1 280px; min-width: 0; }
.ph-search input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--pumpco-border); border-radius: 10px; background: var(--pumpco-surface); }
.ph-segmented { display: flex; padding: 3px; border: 1px solid var(--pumpco-border); border-radius: 10px; background: var(--pumpco-surface); }
.ph-segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--pumpco-blue); font-weight: 700; cursor: pointer; }
.ph-segmented button[aria-pressed="true"] { background: var(--pumpco-blue); color: #fff; }
.ph-inline-select { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 12px; border: 1px solid var(--pumpco-border); border-radius: 10px; background: var(--pumpco-surface); color: var(--pumpco-muted); font-size: .88rem; }
.ph-inline-select select { border: 0; padding: 4px; background: transparent; color: var(--pumpco-text); font-weight: 700; }
.ph-toolbar > .outline-button { min-height: 44px; }
.ph-results { margin-left: auto; color: var(--pumpco-muted); font-size: .88rem; }

.ph-extra-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; border: 1px solid var(--pumpco-border-soft); border-radius: 14px; background: var(--pumpco-surface); }
.ph-extra-filters[hidden] { display: none; }
.ph-extra-filters label { display: grid; gap: 4px; min-width: 190px; color: var(--pumpco-muted); font-size: .82rem; }

.ph-table { min-width: 900px; }
.ph-table td { vertical-align: middle; }
.ph-table tr.is-blocked td { background: #fffafa; }
.ph-row-action { text-align: right; }

.ph-resource { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ph-resource > div { display: grid; gap: 2px; min-width: 0; }
.ph-resource small { color: var(--pumpco-muted); font-size: .82rem; }
.ph-resource .ph-driver-line.tone-warn,
.ph-resource .ph-driver-line.tone-bad { font-weight: 700; }
.ph-avatar { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--pumpco-border-soft); color: var(--pumpco-blue); font-size: .8rem; font-weight: 800; }
.ph-avatar.is-vehicle { background: #e7eef8; }
.ph-avatar-lg { width: 60px; height: 60px; border-radius: 16px; font-size: 1.1rem; }

.ph-pill { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.ph-pill.tone-ok { background: var(--ph-ok-bg); }
.ph-pill.tone-warn { background: var(--ph-warn-bg); }
.ph-pill.tone-bad { background: var(--ph-bad-bg); }
.ph-pill.tone-pending { background: var(--ph-pending-bg); }

.ph-exp-date { display: block; font-variant-numeric: tabular-nums; }
.ph-exp-note { display: block; font-size: .8rem; }

.ph-att { display: inline-flex; gap: 4px; }
.ph-att-btn { width: 38px; height: 38px; border: 1px solid var(--pumpco-border); border-radius: 8px; background: var(--pumpco-surface); color: var(--pumpco-muted); font-weight: 800; cursor: pointer; }
.ph-att-btn:hover { border-color: var(--pumpco-blue); color: var(--pumpco-blue); }
.ph-att-btn.is-active { border-color: var(--pumpco-blue); background: var(--pumpco-blue); color: #fff; }
.ph-blocked-note { color: var(--ph-bad); font-size: .82rem; font-weight: 700; }

.ph-cards { display: none; gap: 8px; }
.ph-card { overflow: hidden; border: 1px solid var(--pumpco-border-soft); border-radius: 14px; background: var(--pumpco-surface); }
.ph-card.is-blocked { background: #fffafa; }
.ph-card-main { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: transparent; color: var(--pumpco-text); font: inherit; text-align: left; cursor: pointer; }
.ph-card-text { display: grid; flex: 1 1 calc(100% - 50px); gap: 3px; min-width: 0; }
.ph-card-main .ph-pill { max-width: calc(100% - 50px); margin-left: 50px; white-space: normal; }
.ph-card-text strong { overflow-wrap: anywhere; }
.ph-card-text small { font-size: .82rem; }
.ph-card-att { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 12px; color: var(--pumpco-muted); font-size: .82rem; }

.ph-empty { display: grid; justify-items: center; gap: 8px; padding: 32px 20px; text-align: center; }
.ph-empty[hidden] { display: none; }
.ph-empty h3, .ph-empty p { margin: 0; }
.ph-rule-note { margin: 0; color: var(--pumpco-muted); font-size: .82rem; }

.ph-workspace.is-dragover::after {
  position: absolute;
  inset: -8px;
  z-index: 25;
  display: grid;
  place-items: center;
  border: 3px dashed var(--pumpco-blue);
  border-radius: var(--pce-radius);
  background: rgba(246, 248, 251, .92);
  color: var(--pumpco-blue);
  font-size: 1.1rem;
  font-weight: 800;
  content: "Soltá los PDF para cargar las credenciales";
  pointer-events: none;
}

html[lang="en"] .ph-workspace.is-dragover::after { content: "Drop the PDFs to upload the credentials"; }

/* Diálogos: ficha del recurso, Tomar lista, alta manual y script. */
/* Ventanas compactas: encabezado y pie fijos, sólo el contenido se desplaza. Nunca ocupan toda la pantalla. */
.ph-dialog { width: min(560px, calc(100vw - 24px)); border-radius: 16px; }
.ph-dialog:modal { max-height: min(720px, calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - var(--browser-bottom-offset, 0px))); }
.ph-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.ph-dialog > .ph-ficha,
.ph-dialog > .ph-rollcall-body,
.ph-dialog > .qaqc-form,
.ph-dialog > .ph-code-block { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ph-dialog > .dialog-header,
.ph-dialog > .ph-dialog-foot,
.ph-dialog > .ph-progress { flex: none; }
.ph-rollcall-dialog { width: min(460px, calc(100vw - 24px)); }
.ph-dialog .dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--pumpco-border-soft); }
.ph-dialog .dialog-header h2 { font-size: 1.05rem; line-height: 1.25; }
.ph-dialog .dialog-header .eyebrow { margin: 0 0 4px; font-weight: 800; }
.ph-dialog .qaqc-form,
.ph-dialog > .form-type-note,
.ph-dialog > .form-actions { padding: 16px 20px; }
.ph-dialog-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid var(--pumpco-border-soft); }
.ph-dialog-actions { display: flex; gap: 8px; margin-left: auto; }
.ph-dialog-actions > a,
.ph-dialog-actions > button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; margin: 0; padding: 0 14px; font-size: .86rem; text-decoration: none; }
.ph-source { color: var(--pumpco-muted); font-size: .78rem; }

.ph-ficha { display: grid; align-content: start; gap: 12px; padding: 14px 16px; }
.ph-ficha-status { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--ph-ok-bg); }
.ph-ficha-status.tone-warn { background: var(--ph-warn-bg); }
.ph-ficha-status.tone-bad { background: var(--ph-bad-bg); }
.ph-ficha-status.tone-pending { background: var(--ph-pending-bg); }
.ph-ficha-status span { color: var(--pumpco-text); font-size: .9rem; }
.ph-ficha-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ph-ficha-edit label { display: grid; gap: 4px; color: var(--pumpco-muted); font-size: .82rem; }
.ph-ficha-edit small { font-size: .78rem; }
.ph-ficha-edit select,
.ph-ficha-edit input { box-sizing: border-box; height: 44px; min-height: 44px; margin: 0; }
.ph-ficha-section { display: grid; gap: 8px; }
.ph-ficha-section h3 { margin: 0; color: var(--pumpco-muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.ph-callout { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--ph-warn-bg); font-size: .88rem; }
.ph-callout.tone-bad { background: var(--ph-bad-bg); }
.ph-muted { margin: 0; color: var(--pumpco-muted); font-size: .88rem; }
.ph-driver-list { display: grid; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--pumpco-border-soft); border-radius: 12px; list-style: none; }
.ph-driver-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--pumpco-border-soft); }
.ph-driver-list li:first-child { border-top: 0; }
.ph-driver-open { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 2px; border: 0; background: transparent; color: var(--pumpco-text); font: inherit; text-align: left; cursor: pointer; }
.ph-driver-open > span:last-child { display: grid; min-width: 0; }
.ph-driver-open small { color: var(--pumpco-muted); font-size: .8rem; }
.ph-icon-btn { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--pumpco-muted); cursor: pointer; }
.ph-icon-btn:hover { background: var(--ph-bad-bg); color: var(--ph-bad); }
.ph-driver-add { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-driver-add label { flex: 1 1 240px; min-width: 0; }
.ph-driver-add select { width: 100%; min-height: 42px; }
/* Datos de la credencial en dos columnas (etiqueta arriba del valor); los largos ocupan las dos. */
.ph-ficha-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; padding: 12px; border: 1px solid var(--pumpco-border-soft); border-radius: 12px; }
.ph-ficha-data > div { display: grid; align-content: start; gap: 2px; min-width: 0; }
.ph-ficha-data > .is-wide { grid-column: 1 / -1; }
.ph-ficha-data dt { color: var(--pumpco-muted); font-size: .76rem; }
.ph-ficha-data dd { margin: 0; font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.ph-history { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ph-history li { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border: 1px solid var(--pumpco-border-soft); border-radius: 10px; color: var(--pumpco-muted); font-size: .76rem; }
.ph-history strong { font-size: .95rem; }
.ph-history .att-p { color: var(--ph-ok); }
.ph-history .att-a { color: var(--ph-bad); }
.ph-history .att-f { color: var(--pumpco-blue); }

.ph-rollcall-dialog .dialog-header { align-items: center; }
.ph-rollcall-progress { margin-left: auto; color: var(--ph-warn); font-weight: 800; white-space: nowrap; }
.ph-rollcall-body { display: grid; align-content: start; gap: 12px; padding: 14px 16px 16px; }
.ph-dialog .ph-rollcall-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--pumpco-border-soft); border-radius: 14px; }
.ph-rollcall-card .ph-resource strong { font-size: 1.02rem; }
.ph-rollcall-card .ph-avatar-lg { width: 48px; height: 48px; border-radius: 12px; font-size: .95rem; }
.ph-rollcall-card .ph-pill { justify-self: start; }
.ph-rollcall-data { padding: 10px 12px; }
.ph-rollcall-actions { display: grid; gap: 10px; }
.ph-rollcall-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ph-rollcall-mark { min-height: 50px; border: 1px solid #bdcad9; border-radius: 14px; background: var(--pumpco-surface); font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.ph-rollcall-mark.is-present { min-height: 54px; border: 0; background: var(--ph-ok); color: #fff; font-size: 1.15rem; }
.ph-rollcall-mark.is-absent { color: var(--ph-bad); }
.ph-rollcall-mark.is-franco { color: var(--pumpco-blue); }
.ph-rollcall-skip { min-height: 44px; border: 0; background: transparent; color: var(--pumpco-muted); font-weight: 700; cursor: pointer; }
.ph-rollcall-done { display: grid; justify-items: center; gap: 10px; padding: 24px 0; text-align: center; }
.ph-rollcall-done strong { font-size: 1.3rem; }
.ph-rollcall-done p { margin: 0; color: var(--pumpco-muted); }

.ph-code-block { max-height: 46vh; margin: 0 20px; padding: 14px; overflow: auto; border-radius: 12px; background: var(--pumpco-navy); color: #e2e8f0; font-size: .78rem; }

@media (max-width: 1080px) {
  .ph-summary { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .ph-head-side { justify-items: stretch; width: 100%; }
  .ph-head-actions { justify-content: stretch; }
  .ph-head-actions > * { flex: 1 1 auto; }
  .ph-sync-status { text-align: left; }
  .ph-status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-status:nth-child(2) { border-right: 0; }
  .ph-status:nth-child(-n + 2) { border-bottom: 1px solid var(--pumpco-border-soft); }
  .ph-status strong { font-size: 1.6rem; }
  .ph-results { width: 100%; margin-left: 0; }
  .ph-table-wrap { display: none; }
  .ph-cards { display: grid; }
  .ph-cards[hidden] { display: none; }
  .ph-ficha-edit { grid-template-columns: minmax(0, 1fr); }
  .ph-dialog:modal { max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - var(--browser-bottom-offset, 0px)); }
}

/* Tranquera tocada en el mapa: estado actual y botones para actualizarlo. */
.gate-dialog { width: min(420px, calc(100vw - 28px)); }
.gate-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--pumpco-border-soft); }
.gate-dialog-head .eyebrow { margin: 0 0 4px; font-weight: 800; }
.gate-dialog-nearby { margin: 14px 20px 0; padding: 10px 12px; border-radius: 10px; background: #fffbeb; color: #78350f; font-size: .9rem; }
.gate-dialog-current { margin: 14px 20px 0; color: var(--pumpco-muted); font-size: .9rem; }
.gate-dialog-current b { color: var(--pumpco-text); }
.gate-dialog-states { margin: 14px 20px 0; padding: 0; border: 0; }
.gate-dialog-states legend { margin-bottom: 8px; color: var(--pumpco-muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gate-state-options { display: grid; gap: 8px; }
.gate-state-option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--pumpco-border); border-radius: 12px; background: var(--pumpco-surface); color: var(--pumpco-text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.gate-state-option:hover:not(:disabled) { border-color: var(--pumpco-blue); }
.gate-state-option[aria-pressed="true"] { border: 2px solid var(--pumpco-blue); background: #eef4fb; }
.gate-state-option:disabled { cursor: default; opacity: .7; }
.gate-dialog > .message { margin: 10px 20px 0; }
.gate-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }

/* ==========================================================================
   iPad (768px–1024px) & Mobile (<= 680px) Comprehensive Responsiveness Suite
   ========================================================================== */

/* 1. Touch / Coarse Pointer Ergonomics (iOS Safari & iPadOS auto-zoom prevention) */
@media (hover: none) and (pointer: coarse) {
  #entry-form input:not([type="checkbox"]):not([type="radio"]),
  #entry-form select,
  #entry-form textarea,
  #inbox-inline-search,
  #inbox-filter-date,
  .topbar .search input,
  .drawer-search input,
  .report-dialog input:not([type="checkbox"]):not([type="radio"]),
  .report-dialog select,
  .report-dialog textarea,
  .tour-jump-select {
    font-size: 16px !important;
  }

  .table-wrap,
  .drawer,
  .report-dialog,
  .gmail-category-tabs {
    -webkit-overflow-scrolling: touch;
  }
}

/* 2. Topbar & Tablet Shell Adjustments (<= 1200px & iPad 681px–1024px) */
@media (max-width: 1200px) {
  .topbar {
    gap: 10px;
    padding-inline: 16px;
  }
  .app-identity .app-divider,
  .app-identity .app-product {
    display: none;
  }
}

@media (min-width: 681px) and (max-width: 1024px) {
  .content {
    padding: 14px 16px 28px;
  }
  #dashboard-reports .data-table-wrap,
  #dashboard-reports .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #dashboard-reports .dashboard-reports-table th,
  #dashboard-reports .dashboard-reports-table td {
    padding: 8px 9px !important;
    font-size: .81rem;
  }
  /* Prevent legacy <=960px card ::before labels from leaking into table cells on iPad */
  #dashboard-reports .dashboard-reports-table tr.dash-row td::before {
    content: none !important;
  }
  .gmail-toolbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .gmail-inline-search {
    max-width: 320px;
  }
}

/* 3. Single-Row Swipeable Gmail Category Tabs on iPad Portrait & Mobile (<= 1023px) */
@media (max-width: 1023px) {
  .gmail-category-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
    padding: 0 6px;
  }
  .gmail-category-tabs::-webkit-scrollbar {
    display: none;
  }
  .gmail-cat-tab {
    flex: 0 0 auto;
    padding: 10px 12px;
    font-size: .82rem;
    white-space: nowrap;
  }

  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav .tab {
    min-width: 0;
    padding-inline: 4px;
  }
  .bottom-nav .tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* 4. Gmail Toolbar Responsive 2-Row Layout (<= 760px) */
@media (max-width: 760px) {
  .gmail-toolbar {
    padding: 8px 10px;
    gap: 8px;
  }
  .gmail-toolbar-left {
    flex: 1 1 100%;
    min-width: 0;
    order: 1;
  }
  .gmail-inline-search {
    flex: 1 1 auto;
    max-width: none;
    min-height: 40px;
  }
  .gmail-toolbar-right {
    flex: 1 1 100%;
    order: 2;
    margin-left: 0;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }
  .gmail-date-filter {
    flex: 1 1 auto;
    min-height: 34px;
  }
  .gmail-page-size-select {
    min-height: 34px;
  }
  .gmail-page-btn {
    width: 36px;
    height: 36px;
  }
}

/* 5. Mobile Phones (<= 680px): Gmail Report Cards, Forms, Dialogs & Tour Sheet */
@media (max-width: 680px) {
  .topbar {
    min-height: calc(60px + env(safe-area-inset-top, 0px));
    padding: max(8px, env(safe-area-inset-top, 0px)) 10px 8px;
    gap: 8px;
  }
  .topbar .icon-button {
    width: 38px;
    height: 38px;
  }
  .app-identity {
    gap: 8px;
  }
  .app-identity img {
    width: 32px;
    height: 32px;
  }
  .user-menu-panel {
    right: 0;
    max-width: calc(100vw - 16px);
  }
  .content {
    padding: 10px 10px 28px;
  }

  /* Override .vc-excel-datatable table display so Received Inbox renders clean mobile cards */
  #dashboard-reports .data-table-wrap,
  #dashboard-reports .table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table,
  #dashboard-reports .dashboard-reports-table {
    display: block !important;
    width: 100% !important;
    border: 0 !important;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table thead,
  #dashboard-reports .dashboard-reports-table thead {
    display: none !important;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody,
  #dashboard-reports .dashboard-reports-table tbody {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    background: #f1f5f9;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row,
  #dashboard-reports .dashboard-reports-table tbody tr.dash-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
    padding: 12px 14px !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td[hidden],
  #dashboard-reports .dashboard-reports-table tbody tr.dash-row > td[hidden] {
    display: none !important;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td:not([hidden]),
  #dashboard-reports .dashboard-reports-table tbody tr.dash-row > td:not([hidden]) {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    white-space: normal !important;
    min-width: 0;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-subject {
    grid-column: 1 / -1;
    order: 1;
    font-size: .92rem;
    font-weight: 800;
    color: var(--pumpco-navy);
    line-height: 1.32;
    padding-bottom: 2px !important;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-when {
    grid-column: 1;
    order: 2;
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-company {
    grid-column: 2;
    order: 3;
    justify-self: end;
    font-size: .76rem;
    font-weight: 700;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-operator {
    grid-column: 1 / -1;
    order: 4;
    font-size: .8rem;
    color: #475569;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-pk-start,
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-pk-end {
    font-size: .78rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #0f172a;
    background: #f8fafc !important;
    padding: 3px 8px !important;
    border-radius: 6px;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-pk-start {
    grid-column: 1;
    order: 5;
    justify-self: start;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-pk-start::before {
    content: "STA Ini: " !important;
    font-family: system-ui, -apple-system, sans-serif;
    color: #64748b;
    font-weight: 700;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-pk-end {
    grid-column: 2;
    order: 6;
    justify-self: end;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-pk-end::before {
    content: "STA Fin: " !important;
    font-family: system-ui, -apple-system, sans-serif;
    color: #64748b;
    font-weight: 700;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-exec-date {
    grid-column: 1;
    order: 7;
    align-self: center;
    font-size: .78rem;
    color: #334155;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-exec-date::before {
    content: "Fecha obra: " !important;
    color: #64748b;
    font-weight: 600;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-signature {
    grid-column: 2;
    order: 8;
    justify-self: end;
    align-self: center;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-actions {
    grid-column: 1 / -1;
    order: 9;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    padding-top: 8px !important;
    border-top: 1px solid #edf2f7 !important;
    justify-self: stretch;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-actions .table-action,
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-actions button,
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-row > td.dash-actions a {
    min-height: 36px;
    padding: 6px 12px;
    font-size: .8rem;
  }
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-empty,
  #dashboard-reports .vc-excel-datatable.dashboard-reports-table tbody tr.dash-empty > td {
    display: block !important;
    padding: 16px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    text-align: center;
  }

  /* Bottom Pager & FAB clearance on phones */
  .gmail-bottom-pager {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 12px 64px;
    text-align: center;
  }
  .gmail-bottom-pager-actions,
  .gmail-bottom-pager-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
  }
  .gmail-bottom-pager-actions .gmail-pill-btn,
  .gmail-bottom-pager-btns .secondary-button {
    flex: 1 1 0;
    min-height: 40px;
    justify-content: center;
  }

  /* WPFD Form Banner & Fields on phones */
  #wpfd-activity-fields .wpfd-form-header-banner {
    padding: 10px 12px !important;
  }
  #wpfd-form-open-tracker-btn {
    width: 100%;
    min-height: 38px;
    justify-content: center;
  }

  /* Report Detail Dialog mobile full-sheet ergonomics */
  .report-dialog {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 14px;
    border-radius: 14px;
  }
  .report-actions-bar {
    gap: 6px;
  }
  .report-actions-bar button,
  .report-actions-bar a {
    flex: 1 1 auto;
    min-height: 38px;
    justify-content: center;
  }

  /* Excel popup menu bounded inside mobile viewport */
  .vc-excel-menu {
    max-width: calc(100vw - 16px) !important;
  }
}

/* 6. Compact Mobile Tour Card & Ultra-Narrow Phone Bottom-Nav (<= 640px / <= 480px) */
@media (max-width: 640px) {
  .tour-card {
    max-height: min(54dvh, 390px);
    overflow-y: auto;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(9, 16, 26, 0.42);
  }
  .tour-head-row {
    gap: 6px;
    margin-bottom: 6px;
  }
  .tour-card h2 {
    font-size: .98rem;
    margin: 4px 0;
  }
  .tour-body-text {
    font-size: .83rem;
    line-height: 1.42;
  }
  .tour-card footer {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }
  .tour-card footer > span {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 6px;
  }
  .tour-card footer button {
    min-height: 36px;
    padding-inline: 10px;
    font-size: .8rem;
  }
}

@media (max-width: 480px) {
  .bottom-nav .tab {
    padding-inline: 2px;
    gap: 2px;
  }
  .bottom-nav .tab span {
    font-size: .66rem;
    letter-spacing: -0.01em;
  }
  .bottom-nav .tab-svg {
    width: 19px;
    height: 19px;
  }
}

/* Executive KPI Header Strip & Tabular Engineering Sheet inside Issued Field Report Dialog (#report-dialog) */
.report-kpi-header {
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-doc-control-box {
  display: grid;
  grid-template-columns: 1.15fr 1.6fr 1.25fr;
  border: 1.5px solid #101923;
  border-bottom: 3px solid #dcb426;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.report-doc-brand,
.report-doc-center {
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  border-right: 1px solid #cbd5e1;
}

.report-doc-client {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #101923;
}

.report-doc-brand strong {
  font-size: 0.82rem;
  color: #1e3a8a;
}

.report-doc-brand small {
  font-size: 0.72rem;
  color: #64748b;
}

.report-doc-center {
  text-align: center;
  background: #f8fafc;
}

.report-doc-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.report-doc-center h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.report-doc-center strong {
  font-size: 0.8rem;
  color: #1e293b;
}

.report-doc-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.report-doc-meta-table th,
.report-doc-meta-table td {
  padding: 0.24rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.report-doc-meta-table tr:last-child th,
.report-doc-meta-table tr:last-child td {
  border-bottom: none;
}

.report-doc-meta-table th {
  width: 36%;
  background: #eef2f7;
  color: #101923;
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  border-right: 1px solid #cbd5e1;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.report-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-top: 3px solid #101923;
}

.report-kpi-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
}

.report-kpi-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.report-kpi-card small {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.28;
}

.report-corridor-bar-wrap {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.report-corridor-bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #475569;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.report-corridor-bar-labels strong {
  color: #0f172a;
}

.report-corridor-track {
  position: relative;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.report-corridor-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #dcb426 0%, #059669 100%);
  border-radius: 999px;
  min-width: 6px;
}

.report-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

.report-eng-section-wrap {
  border: 1px solid #94a3b8;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.report-eng-section-bar {
  background: #101923;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.42rem 0.7rem;
  border-bottom: 2px solid #dcb426;
}

.report-eng-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.report-eng-table tr {
  border-bottom: 1px solid #cbd5e1;
}

.report-eng-table tr:last-child {
  border-bottom: none;
}

.report-eng-th {
  width: 19%;
  background: #eef2f7;
  color: #101923;
  font-weight: 700;
  font-size: 0.73rem;
  text-align: left;
  padding: 0.42rem 0.6rem;
  border-right: 1px solid #cbd5e1;
  vertical-align: top;
}

.report-eng-td {
  width: 31%;
  color: #0f172a;
  padding: 0.42rem 0.65rem;
  border-right: 1px solid #cbd5e1;
  vertical-align: top;
  word-break: break-word;
}

.report-eng-td:last-child {
  border-right: none;
}

.report-tracker-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  min-width: 560px;
}

.report-tracker-table th {
  background: #eef2f7;
  color: #101923;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.4rem 0.55rem;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #94a3b8;
  text-align: center;
  white-space: nowrap;
}

.report-tracker-table td {
  padding: 0.45rem 0.55rem;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  color: #0f172a;
  font-weight: 600;
  background: #ffffff;
}

.report-tracker-table th:last-child,
.report-tracker-table td:last-child {
  border-right: none;
}

@media (max-width: 860px) {
  .report-doc-control-box {
    grid-template-columns: 1fr;
  }
  .report-doc-brand,
  .report-doc-center {
    border-right: none;
    border-bottom: 1px solid #cbd5e1;
  }
  .report-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-eng-table,
  .report-eng-table tbody,
  .report-eng-table tr,
  .report-eng-th,
  .report-eng-td {
    display: block;
    width: 100%;
  }
  .report-eng-th {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .report-eng-td {
    border-right: none;
    border-bottom: 1px solid #cbd5e1;
  }
}

@media (max-width: 540px) {
  .report-kpi-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Custom localized file picker (replaces OS-locale native file input button/status) */
.custom-file-picker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 12px;
  border: 1px solid var(--pumpco-border, #cbd5e1);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-file-picker:hover {
  border-color: #94a3b8;
}

.sr-only-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid #94a3b8;
  border-radius: 7px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.custom-file-picker:hover .custom-file-btn {
  background: #e2e8f0;
  border-color: #64748b;
}

.sr-only-file-input:focus-visible + .custom-file-btn {
  outline: 2px solid var(--pumpco-navy, #0d1b28);
  outline-offset: 2px;
}

.sr-only-file-input:disabled + .custom-file-btn,
.sr-only-file-input:disabled ~ .custom-file-status {
  opacity: 0.55;
  cursor: not-allowed;
}

.custom-file-status {
  min-width: 0;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Station Tracker Jump-to-Active-Front highlight animations */
@keyframes wpfdJumpPulse {
  0% {
    box-shadow: inset 0 0 0 2px #f59e0b, 0 0 0 4px rgba(245, 158, 11, 0.35);
    background-color: #fef3c7;
  }
  65% {
    box-shadow: inset 0 0 0 2px #f59e0b, 0 0 0 2px rgba(245, 158, 11, 0.18);
    background-color: #fffbeb;
  }
  100% {
    box-shadow: none;
  }
}

.wpfd-jump-col-flash {
  background: #fef3c7 !important;
  color: #92400e !important;
  box-shadow: inset 0 -3px 0 #f59e0b !important;
  transition: background 0.3s ease;
}

.wpfd-jump-row-flash td:first-child {
  background: #fffbeb !important;
  box-shadow: inset 4px 0 0 #f59e0b !important;
}

.wpfd-jump-cell-flash {
  animation: wpfdJumpPulse 2.4s ease-out;
  z-index: 2;
}

.map-feature-task-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.76rem;
  font-weight: 800;
}

.map-feature-task-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--task-chip-color, #38bdf8);
  box-shadow: 0 0 0 1px #ffffff;
  flex: 0 0 auto;
}
