:root {
  --ink: #19211d;
  --muted: #68736d;
  --line: #dfe5e1;
  --panel: #ffffff;
  --surface: #f2f5f3;
  --green: #0f7150;
  --green-soft: #dff1e9;
  --orange: #e57734;
  --blue: #3478d4;
  --danger: #b83b44;
  --shadow: 0 10px 30px rgba(25, 33, 29, .12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body > main { flex: 1 1 auto; min-height: 0; }
button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

.topbar {
  flex: none;
  display: flex;
  flex-direction: column;
  background: #17231e;
  color: white;
  border-bottom: 1px solid #27372f;
  min-width: 0;
}
.topbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 3px 10px 3px 12px;
}
.topbar-tools {
  border-top: 1px solid #2a3d34;
  min-height: 32px;
  flex-wrap: nowrap;
  padding-top: 2px;
  padding-bottom: 2px;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: auto;
  min-width: 0;
}
.topbar .session-user {
  color: #aebbb5;
  font-size: 12px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .topbar-btn {
  border: 1px solid #4f645b;
  background: #31453d;
  color: #eef6f2;
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.topbar .topbar-btn:hover { background: #3a5248; border-color: #6f877d; }
.brand {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.app-nav a,
.app-nav a:visited {
  color: #d7e6de;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.app-nav a:hover { color: white; background: #24352d; }
.app-nav a.active { color: white; background: #2a9b70; }
.brand-mark {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 7px; background: #2a9b70; font-weight: 800; font-size: 13px;
}
.brand div { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 13px; }
.brand span:last-child { color: #aebbb5; font-size: 10px; margin-top: 1px; }
.tabs {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  height: auto;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}
.tab {
  border: 0; border-bottom: 2px solid transparent; padding: 0 10px;
  height: 30px;
  color: #aebbb5; background: none; cursor: pointer; font-weight: 600; font-size: 12px;
  white-space: nowrap;
}
.tab:hover, .tab.active { color: white; }
.tab.active { border-bottom-color: #4bc08f; }
.top-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: auto;
}
.import-open {
  height: 28px; border: 1px solid #3f6a58; border-radius: 7px; padding: 0 10px;
  background: #2a9b70; color: white; font-size: 11px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
}
.import-open:hover { background: #36aa7e; border-color: #57d39d; }
.options-open {
  border: 1px solid #4f645b; background: #31453d; color: #eef6f2; border-radius: 7px;
  padding: 4px 9px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.options-open:hover { background: #3a5248; border-color: #6f877d; }
.camera-tally {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid #3f6a58; border-radius: 8px; padding: 2px 8px 2px 6px;
  background: #234036; color: white; cursor: pointer; text-align: left;
}
.camera-tally:hover { border-color: #57d39d; background: #2a4d3f; }
.tally-icon { color: #4bc08f; font-size: 13px; line-height: 1; }
.camera-tally strong { font-size: 15px; line-height: 1; }
.tally-copy { display: flex; flex-direction: column; line-height: 1.15; }
.camera-tally b { font-size: 9px; font-weight: 700; color: #e2efe9; white-space: nowrap; }
.camera-tally small { color: #9fb3aa; font-size: 9px; font-weight: 600; white-space: nowrap; }
#headerNeeded { color: #c9e6d8; }
.sync { color: #b8c7bf; font-size: 12px; white-space: nowrap; }
.sync i {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; background: #49c88f; box-shadow: 0 0 0 4px rgba(73,200,143,.13);
}
.sync.error i { background: #e56870; }

.app-layout {
  height: auto;
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
}
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.section-heading { display: flex; align-items: center; justify-content: space-between; }
.eyebrow {
  display: block; color: var(--green); font-size: 10px; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 3px;
}
h1, h2, p { margin-top: 0; }
.section-heading h2 { margin: 0; font-size: 20px; }
.icon-button {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  background: white; cursor: pointer; display: grid; place-items: center; font-size: 20px;
}
.icon-button:hover { background: #f4f7f5; border-color: #bdc8c2; }
.file-browser { display: flex; flex-direction: column; min-height: 0; padding: 16px 12px 0; }
.file-count-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.search-wrap { position: relative; }
.search-wrap span {
  position: absolute; left: 12px; top: 8px; color: var(--muted); font-size: 20px;
}
.search-wrap input {
  width: 100%; height: 39px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 12px 0 38px; outline: none; background: #fafcfb;
}
.search-wrap input:focus { border-color: #4b9f7e; box-shadow: 0 0 0 3px #e0f1ea; }
.stores-heading-actions { display: flex; gap: 8px; align-items: center; }
.stores-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.stores-toolbar .search-wrap { flex: 1; min-width: 220px; margin: 0; }
.stores-toolbar select {
  height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px;
  background: white; font-size: 12px; font-weight: 600; color: #3f4b45;
}
.stores-count { color: var(--muted); font-size: 11px; font-weight: 700; }
.stores-table-wrap {
  border: 1px solid var(--line); border-radius: 12px; background: white;
  overflow: auto; max-height: calc(100vh - 260px);
}
.stores-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stores-table th {
  position: sticky; top: 0; z-index: 1; background: #f4f7f5; text-align: left;
  padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--muted);
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.stores-table td { padding: 7px 10px; border-bottom: 1px solid #eef2f0; color: #34403a; }
.stores-table tr:hover td { background: #fafcfb; }
.stores-table td.cell { cursor: text; }
.stores-table td.cell:hover { box-shadow: inset 0 0 0 1px #b9cbc2; }
.stores-table td.locked { cursor: default; font-weight: 700; color: var(--ink); }
.stores-table td.changed { background: #fff8e6; box-shadow: inset 2px 0 0 #e6a700; }
.stores-table td input {
  width: 100%; border: 1px solid var(--green); border-radius: 5px;
  padding: 3px 5px; font: inherit; color: inherit;
}
.stores-table .plan-cell { width: 34px; text-align: center; }
.stores-table .plan-dot { color: var(--green); font-size: 10px; }

.plan-sort { display: grid; gap: 4px; margin-top: 12px; color: #58655e; font-size: 11px; font-weight: 700; }
.plan-sort select { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 12px; font-weight: 600; color: #3f4b45; padding: 0 8px; }
.filter-bar { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.filter-toggle {
  flex: 1; display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fafcfb;
  color: #3f4b45; cursor: pointer; font-size: 11px; font-weight: 700;
}
.filter-toggle:hover { border-color: #9fb0a7; }
.filter-toggle.has-filters { border-color: #4b9f7e; background: #eef8f3; color: #0d6547; }
.filter-count {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  display: grid; place-items: center; background: var(--green); color: white;
  font-size: 9px; font-weight: 800;
}
.filter-clear {
  border: 0; border-radius: 8px; padding: 0 9px; height: 32px; background: #eef2f0;
  color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700;
}
.filter-clear:hover { color: var(--ink); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.filter-chips:empty { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  border: 1px solid #cfe4d9; border-radius: 20px; padding: 3px 7px 3px 9px;
  background: #eef8f3; color: #0d6547; cursor: pointer; font-size: 10px;
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filter-chip b { font-weight: 800; }
.filter-chip i { font-style: normal; font-size: 12px; color: #5d8a78; }
.filter-chip:hover { background: #e0f1ea; }
.filter-chip:hover i { color: #b3261e; }

.filter-dialog {
  position: fixed; inset: 0; background: rgba(22, 32, 28, .42);
  display: grid; place-items: center; z-index: 94; padding: 20px;
}
.filter-dialog.hidden { display: none; }
.filter-card {
  width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: white; border-radius: 14px; box-shadow: var(--shadow);
  padding: 18px; display: grid; gap: 16px;
}
.filter-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.filter-card-head h2 { margin: 3px 0 0; font-size: 18px; }
.filter-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.filter-group { display: grid; gap: 10px; align-content: start; }
.filter-group h3 {
  margin: 0; color: var(--muted); font-size: 10px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
}
.filter-field { display: grid; gap: 4px; }
.filter-field span {
  color: #58655e; font-size: 11px; font-weight: 700;
}
.filter-field select {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  background: white; font-size: 12px; font-weight: 600; color: #3f4b45; padding: 0 8px;
}
.filter-field select:focus { outline: none; border-color: #4b9f7e; box-shadow: 0 0 0 3px #e0f1ea; }
.filter-card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 14px;
}
.filter-preview { color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-card-actions { display: flex; gap: 8px; }
@media (max-width: 620px) {
  .filter-groups { grid-template-columns: minmax(0, 1fr); }
}
.file-count {
  color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  font-size: 9px; font-weight: 800; padding: 3px 6px 8px;
}
.file-list { overflow: auto; padding: 0 2px 20px; }
.store-group { margin-bottom: 13px; }
.store-name-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 22px 56px; align-items: center;
  gap: 4px; padding: 4px 4px 2px;
}
.store-index {
  font-size: 9px; font-weight: 800; color: #8a9790; font-variant-numeric: tabular-nums;
  text-align: right; letter-spacing: 0;
}
.title-row { display: flex; align-items: center; gap: 8px; }
.title-row .store-index {
  min-width: 28px; color: var(--green); background: var(--green-soft);
  border-radius: 4px; padding: 1px 5px; text-align: center;
}
.note-btn {
  width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px;
  background: white; color: #8a9790; font-size: 11px; line-height: 1; cursor: pointer;
  padding: 0;
}
.note-btn:hover { border-color: #9fb0a7; color: var(--ink); }
.note-btn.has-note { border-color: #d4a017; background: #fff8e6; color: #b07a00; }
#storeNoteButton.has-note { border-color: #d4a017; background: #fff8e6; color: #8a5a00; }
.pack-select { min-width: 0; width: 100%; }
.store-name {
  min-width: 0; font-size: 11px; font-weight: 800; color: #53625a;
}
.store-name span, .store-name small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.store-name small { font-size: 10px; font-weight: 600; color: var(--muted); }
.pack-select, .pack-picker select {
  height: 26px; border: 1px solid var(--line); border-radius: 6px; background: white;
  font-size: 10px; font-weight: 800; color: #3f4b45; padding: 0 4px;
}
.pack-select.has-pack { border-color: #4b9f7e; color: #0d6547; background: #eef8f3; }
.pack-picker {
  display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 7px; background: white;
  font-size: 11px; font-weight: 700;
}
.pack-picker span { color: var(--muted); }
.file-item {
  width: 100%; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto;
  align-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 9px 8px;
  text-align: left; background: transparent; cursor: pointer;
}
.alt-toggle {
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 7px;
  color: var(--muted); background: white; font-size: 9px; font-weight: 800;
}
.alt-toggle:hover { border-color: #9fb0a7; color: var(--ink); }
.alt-list { margin: 2px 0 8px 14px; border-left: 2px solid #e4eae6; padding-left: 4px; }
.alt-item { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; }
.alt-item.chosen { background: #f4f8f6; border-radius: 7px; }
.alt-item .file-item { grid-template-columns: minmax(0, 1fr); padding: 6px 6px; }
.alt-item .file-copy strong { font-size: 11px; font-weight: 600; }
.alt-item .file-item.clean { box-shadow: inset 3px 0 0 #e6a700; }
.star {
  display: grid; place-items: center; height: 22px; color: #b6c1bb;
  cursor: pointer; font-size: 14px; line-height: 1;
}
.star:hover { color: #e0a500; }
.star.on { color: #e6a700; }
.file-item:hover { background: #f1f5f3; }
.file-item.active { background: var(--green-soft); color: #0b5d41; }
.file-icon {
  position: relative; width: 24px; height: 28px; display: grid; place-items: center;
  border-radius: 5px; background: #e7ece9; font-size: 9px; font-weight: 800; color: #6b7770;
}
.file-item.available .file-icon { color: white; background: #c64c54; }
.file-item.available .file-icon.clean { background: #0f7150; }
.file-icon.clean::after {
  content: "✓";
  position: absolute; right: -4px; top: -5px; width: 13px; height: 13px;
  display: grid; place-items: center; border-radius: 50%; border: 1.5px solid white;
  background: #e6a700; color: #3d2c00; font-size: 8px; line-height: 1;
}
.file-item.clean .file-copy small { color: #0b6245; font-weight: 700; }
.file-copy { overflow: hidden; }
.file-copy strong, .file-copy small {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.file-copy strong { font-size: 12px; font-weight: 650; }
.file-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9c2bd; }
.status-dot.ok { background: #2ca876; }
.status-dot.error { background: #d45159; }

.workspace { min-width: 0; min-height: 0; position: relative; }
.empty-state {
  height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center;
  color: var(--muted); text-align: center;
}
.empty-state h1 { color: var(--ink); margin: 18px 0 8px; font-size: 25px; }
.empty-state p { max-width: 360px; }
.empty-icon {
  width: 74px; height: 74px; border-radius: 22px; background: white; box-shadow: var(--shadow);
  display: grid; place-items: center; font-size: 35px; color: var(--green);
}
.viewer { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) 34px; }
.viewer-chrome {
  background: white;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 3px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
}
.viewer-bar .doc-line {
  margin: 0;
  flex: 0 1 240px;
  min-width: 120px;
  max-width: 280px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 5px;
}
.viewer-bar .doc-store { color: var(--green); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.viewer-bar .doc-sep { color: #b8c4bd; font-weight: 600; }
.viewer-bar .doc-file { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.viewer-bar .badge { padding: 2px 6px; font-size: 10px; border-radius: 5px; white-space: nowrap; line-height: 1.3; }
.viewer-bar .button.compact,
.viewer-bar #fitButton {
  height: 26px;
  padding: 0 7px;
  font-size: 10px;
  border-radius: 6px;
  line-height: 1;
}
.viewer-bar .pack-picker.compact,
.viewer-bar .camera-picker.compact {
  height: 26px;
  padding: 0 4px;
  gap: 4px;
  border-radius: 6px;
  font-size: 10px;
  flex: 0 0 auto;
}
.viewer-bar .camera-picker.compact select { max-width: 108px; border: 0; background: transparent; font: inherit; font-weight: 700; outline: none; }
.viewer-bar .plan-validated-label { font-size: 10px; gap: 4px; }
.viewer-bar .plan-validated-label input { width: 13px; height: 13px; }
.viewer-bar .tool,
.viewer-bar .icon-toggle,
.viewer-bar .icon-button {
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 13px;
  flex: 0 0 auto;
}
.viewer-bar .icon-toggle-svg { width: 15px; height: 15px; }
.viewer-bar #zoomLabel,
.viewer-bar .page-readout {
  font-size: 10px;
  font-weight: 700;
  min-width: 34px;
  text-align: center;
}
.viewer-bar .bar-split {
  width: 1px;
  height: 16px;
  background: var(--line);
  flex: 0 0 auto;
  margin: 0 2px;
}
.viewer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px; background: white; border-bottom: 1px solid var(--line);
}
.viewer-head.compact {
  display: grid;
  grid-template-columns: minmax(140px, 34%) minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 5px 12px;
  border-bottom: none;
}
.document-title span { color: var(--green); font-size: 11px; font-weight: 700; }
.document-title h1 { margin: 3px 0 0; font-size: 17px; }
.document-title.compact h1.doc-line {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.doc-line .store-index { flex: 0 0 auto; }
.doc-line .doc-store { color: var(--green); font-size: 11px; font-weight: 800; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-line .doc-sep { color: #b8c4bd; font-weight: 600; flex: 0 0 auto; }
.doc-line .doc-file { color: var(--ink); font-weight: 700; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.document-meta { display: flex; align-items: center; gap: 8px; }
.document-meta.compact {
  gap: 5px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.doc-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; margin-left: 2px; }
.badge.compact { padding: 3px 6px; font-size: 10px; border-radius: 6px; }
.button.compact { padding: 4px 8px; height: 28px; font-size: 10px; border-radius: 6px; line-height: 1; }
.pack-picker.compact {
  height: 28px;
  padding: 0 6px;
  font-size: 10px;
  gap: 4px;
  border-radius: 6px;
  flex: 0 0 auto;
}
.plan-validated-label.compact { font-size: 10px; gap: 4px; flex: 0 0 auto; }
.plan-validated-label.compact input { width: 13px; height: 13px; }
.badge {
  background: var(--green-soft); color: #0d6547; padding: 6px 9px;
  border-radius: 7px; font-size: 11px; font-weight: 700;
}
.badge.dark { color: #49554f; background: #eef1ef; }
.badge.clean { color: #3d2c00; background: #ffe9a8; }
.badge.validated { color: #0f5132; background: #dff1e9; }
.plan-validated-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.plan-validated-label input { width: 15px; height: 15px; accent-color: var(--green); }
.viewer.plan-locked .marker-layer,
.viewer.plan-locked .coverage-layer { pointer-events: none; }
.viewer.plan-locked .marker-item .marker-handle,
.viewer.plan-locked .marker-range-label { display: none; }
.file-count-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-count-row .button.subtle { padding: 6px 10px; font-size: 11px; }
.file-item.validated .file-copy strong::after {
  content: " · validado";
  color: var(--green);
  font-weight: 700;
  font-size: 10px;
}
.button {
  border: 0; border-radius: 8px; padding: 8px 12px; text-decoration: none;
  cursor: pointer; font-size: 11px; font-weight: 700;
}
.button.subtle { border: 1px solid var(--line); color: #3f4b45; background: white; }
.button.primary { color: white; background: var(--green); }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 14px; background: #f9fbfa; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.toolbar.compact {
  padding: 4px 12px 5px;
  gap: 8px;
  flex-wrap: nowrap;
  background: #f4f7f5;
  border-bottom: none;
  border-top: 1px solid var(--line);
}
.viewer-chrome .tool-label { display: none; }
.viewer-chrome .tool { height: 30px; padding: 0 8px; font-size: 10px; }
.viewer-chrome .camera-picker.compact {
  height: 30px;
  padding: 0 6px 0 8px;
  font-size: 10px;
}
.viewer-chrome .camera-picker.compact select { max-width: 120px; }
.viewer-chrome #copyCameras,
.viewer-chrome #pasteCameras { height: 30px; }
.icon-toggle {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #5a6860;
  cursor: pointer;
  flex: 0 0 auto;
}
.icon-toggle:hover { border-color: #9fb0a7; color: var(--ink); }
.icon-toggle.active {
  color: white;
  background: #26342e;
  border-color: #26342e;
}
.icon-toggle-svg { width: 17px; height: 17px; display: block; }
.viewer-chrome .zoom-controls .icon-button,
.viewer-chrome .page-controls .icon-button { width: 28px; height: 28px; }
.viewer-chrome #zoomLabel { width: 42px; font-size: 10px; }
.viewer-chrome .page-controls span { font-size: 10px; min-width: 44px; }
.viewer-chrome .zoom-controls .button.compact { height: 28px; }
.tool-group { display: flex; align-items: center; gap: 5px; }
.tool {
  height: 34px; border: 1px solid transparent; border-radius: 7px; padding: 0 10px;
  background: transparent; cursor: pointer; font-size: 11px; font-weight: 700;
}
.tool:hover { background: white; border-color: var(--line); }
.tool.active { color: white; background: #26342e; }
.tool.danger.active { background: var(--danger); }
#copyCameras, #pasteCameras { height: 34px; }
#copyCameras:disabled, #pasteCameras:disabled { opacity: .45; cursor: default; }
.camera-picker {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px 0 10px;
  border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 11px; font-weight: 700;
}
.camera-picker span { color: var(--muted); }
.camera-picker select {
  border: 0; background: transparent; font: inherit; color: inherit; max-width: 180px; outline: none;
}
.camera-picker.placing { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(229,119,52,.16); }
.zoom-controls .icon-button, .page-controls .icon-button { width: 30px; height: 30px; }
#zoomLabel { width: 46px; text-align: center; font-size: 11px; font-weight: 700; }
.page-controls span { font-size: 11px; min-width: 50px; text-align: center; }
.canvas-scroller {
  overflow: auto; position: relative; background: #d7dcd9; padding: 28px;
  cursor: grab; overscroll-behavior: contain; user-select: none;
}
.canvas-scroller.panning, .canvas-scroller.panning * { cursor: grabbing !important; }
.pdf-sheet {
  position: relative; margin: 0 auto; width: max-content; min-width: 200px; min-height: 200px;
  background: white; box-shadow: 0 6px 24px rgba(27, 36, 31, .25); line-height: 0;
}
#pdfImage { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.coverage-layer {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  overflow: visible; pointer-events: none;
}
.marker-layer { position: absolute; inset: 0; z-index: 2; cursor: grab; touch-action: none; }
.marker-layer.add-mode, .marker-layer.aim-mode { cursor: crosshair; }
.marker-layer.delete-mode .marker { cursor: pointer; }
.marker-item { position: absolute; width: 0; height: 0; overflow: visible; pointer-events: none; }
.marker-item.selected, .marker-item.aiming { z-index: 4; }
.marker {
  position: absolute; left: 0; top: 0; z-index: 2; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  display: grid; place-items: center; border: 3px solid white; color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: grab; line-height: 1; user-select: none;
  border-radius: 50%; font-size: 9px; font-weight: 800; pointer-events: auto;
}
.marker-item.selected .marker { box-shadow: 0 0 0 3px rgba(38, 52, 46, .28), 0 2px 8px rgba(0,0,0,.35); }
.marker-handle {
  position: absolute; left: 0; top: 0; z-index: 3; padding: 0; pointer-events: auto;
  border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: grab;
}
.marker-handle.rotate {
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
}
.marker-handle.cone {
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: white; border-width: 3px;
}
.marker-handle.range {
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 2px; background: white;
}
.marker-range-label {
  position: absolute; z-index: 3; transform: translate(0, -50%);
  padding: 1px 4px; border-radius: 999px; background: rgba(255,255,255,.94);
  color: #1b2420; font-size: 10px; font-weight: 800; line-height: 1.35;
  pointer-events: none; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.marker.cam-01 { background: #c0392b; }
.marker.cam-02 { background: #e67e22; }
.marker.cam-03 { background: #d4a017; }
.marker.cam-04 { background: #27ae60; }
.marker.cam-05 { background: #2980b9; }
.marker.cam-06 { background: #8e44ad; }
.marker.cam-07 { background: #16a085; }
.marker.cam-08 { background: #d35400; }
.marker.cam-09 { background: #e74c3c; }
.marker.cam-10 { background: #2c3e50; }
.marker.cam-11 { background: #1abc9c; }
.marker.cam-12 { background: #7f8c8d; }
.marker.cam-13 { background: #6c3483; }
.marker.cam-14 { background: #117a65; }
.marker:hover { z-index: 10; filter: brightness(1.08); }
.marker:active { cursor: grabbing; }
.popover {
  position: fixed; z-index: 60; width: 236px; max-height: 60vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 11px; background: white;
  box-shadow: 0 14px 34px rgba(25, 33, 29, .22); line-height: 1.2;
}
.popover-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f8faf9;
  position: sticky; top: 0;
}
.popover-head strong { font-size: 11px; }
.popover-close {
  border: 0; background: none; cursor: pointer; font-size: 17px; color: var(--muted);
  line-height: 1; padding: 0 2px;
}
.popover-close:hover { color: var(--ink); }
.popover-list { padding: 6px; }
.popover-group {
  color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 8px 7px 4px;
}
.popover-item {
  width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center; gap: 8px; border: 0; border-radius: 7px; padding: 7px;
  background: transparent; cursor: pointer; text-align: left; font-size: 12px;
}
.popover-item:hover:not(:disabled) { background: var(--green-soft); }
.popover-item:disabled { cursor: default; color: #9aa6a0; }
.popover-item i {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.swatch.cam-01 { background: #c0392b; }
.swatch.cam-02 { background: #e67e22; }
.swatch.cam-03 { background: #d4a017; }
.swatch.cam-04 { background: #27ae60; }
.swatch.cam-05 { background: #2980b9; }
.swatch.cam-06 { background: #8e44ad; }
.swatch.cam-07 { background: #16a085; }
.swatch.cam-08 { background: #d35400; }
.swatch.cam-09 { background: #e74c3c; }
.swatch.cam-10 { background: #2c3e50; }
.swatch.cam-11 { background: #1abc9c; }
.swatch.cam-12 { background: #7f8c8d; }
.swatch.cam-13 { background: #6c3483; }
.swatch.cam-14 { background: #117a65; }
.popover-item b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover-item small { color: var(--muted); font-size: 9px; font-weight: 700; }
.page-loading {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; color: #66736c;
  background: rgba(255,255,255,.86); font-size: 13px; line-height: 1;
}
.viewer-foot {
  display: flex; align-items: center; gap: 18px; padding: 0 16px;
  background: white; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px;
}
.viewer-foot .hint { flex: 1; min-width: 0; }
.scale-readout { white-space: nowrap; font-weight: 700; color: #3f4b45; }
.page-counts { display: flex; gap: 10px; flex-wrap: wrap; min-width: 0; }
.page-counts span { white-space: nowrap; }
.legend-dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.legend-dot.cam-01 { background: #c0392b; }
.legend-dot.cam-02 { background: #e67e22; }
.legend-dot.cam-03 { background: #d4a017; }
.legend-dot.cam-04 { background: #27ae60; }
.legend-dot.cam-05 { background: #2980b9; }
.legend-dot.cam-06 { background: #8e44ad; }
.legend-dot.cam-07 { background: #16a085; }
.legend-dot.cam-08 { background: #d35400; }
.legend-dot.cam-09 { background: #e74c3c; }
.legend-dot.cam-10 { background: #2c3e50; }
.legend-dot.cam-11 { background: #1abc9c; }
.legend-dot.cam-12 { background: #7f8c8d; }
.legend-dot.cam-13 { background: #6c3483; }
.legend-dot.cam-14 { background: #117a65; }
.viewer-foot .hint { margin-left: auto; }

.summary-view {
  height: auto; overflow: auto; padding: 36px clamp(24px, 5vw, 70px);
}
.summary-heading { display: flex; justify-content: space-between; align-items: start; }
.summary-heading h1 { font-size: 28px; margin: 4px 0 7px; }
.summary-heading p { color: var(--muted); font-size: 13px; }
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.summary-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.summary-card span { color: var(--muted); font-size: 12px; }
.summary-card strong { font-size: 26px; line-height: 1.15; }
.page-home .tool-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
  max-width: 900px;
}
a.tool-card,
a.tool-card:link,
a.tool-card:visited,
a.tool-card:hover,
a.tool-card:active {
  color: var(--ink);
  text-decoration: none;
  min-height: 112px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
a.tool-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
a.tool-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  text-decoration: none;
}
a.tool-card:hover:not(.disabled) {
  border-color: #9bc4b0;
  box-shadow: 0 6px 24px rgba(15, 113, 80, .1);
}
a.tool-card.disabled {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}
.page-home .home-actions {
  max-width: 900px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.page-home .summary-heading p {
  max-width: 42rem;
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
}
.page-home #catalogMessage {
  max-width: 42rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.summary-card.total { border-top: 4px solid var(--green); }
.summary-card.stores { border-top: 4px solid #839187; }
.pack-chart {
  margin: 8px 0 28px; padding: 18px 20px 14px; border: 1px solid var(--line);
  border-radius: 13px; background: white;
}
.pack-chart-head h2 { font-size: 18px; margin: 3px 0 4px; }
.pack-chart-head p { color: var(--muted); font-size: 12px; margin: 0 0 14px; }
.pack-bars { display: grid; gap: 10px; }
.pack-bar-row {
  display: grid; grid-template-columns: 68px minmax(0, 1fr) 92px;
  align-items: center; gap: 10px;
}
.pack-bar-label { font-size: 12px; font-weight: 800; color: #3f4b45; }
.pack-bar-track { height: 18px; border-radius: 9px; background: #eef2f0; overflow: hidden; }
.pack-bar { height: 100%; border-radius: 9px; min-width: 0; }
.pack-bar.pack-4 { background: #9bb8ab; }
.pack-bar.pack-8 { background: #2ca876; }
.pack-bar.pack-10 { background: #1e7a5c; }
.pack-bar.pack-12 { background: #0d4f3c; }
.pack-bar-value { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.pack-bar-value b { color: var(--ink); font-weight: 800; margin-right: 6px; }
.summary-table-wrap {
  position: relative; border: 1px solid var(--line); border-radius: 13px;
  overflow: auto; background: white;
}
table { width: 100%; border-collapse: collapse; min-width: 1100px; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e8ece9; text-align: left; }
th { color: var(--muted); background: #f7f9f8; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; }
td { font-size: 13px; }
td:not(:first-child), th:not(:first-child) { text-align: center; }
.note-none { color: #c2ccc7; }
#cameraSummaryBody .note-btn { display: inline-grid; place-items: center; margin: 0 auto; }
tbody tr:hover { background: #fafcfb; }
.table-empty { padding: 70px; text-align: center; color: var(--muted); }
.toast {
  position: fixed; right: 20px; bottom: 20px; transform: translateY(90px);
  border-radius: 9px; background: #26342e; color: white; padding: 11px 15px;
  box-shadow: var(--shadow); font-size: 12px; transition: transform .2s; z-index: 100;
}
.toast.show { transform: translateY(0); }
.toast.error { background: var(--danger); }
.note-dialog {
  position: fixed; inset: 0; background: rgba(22, 32, 28, .35);
  display: grid; place-items: center; z-index: 90; padding: 20px;
}
.note-dialog.hidden { display: none; }
.note-card {
  width: min(460px, 100%); background: white; border-radius: 14px;
  box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px;
}
.note-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.note-head strong { display: block; font-size: 13px; }
.note-head span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.note-card textarea {
  width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--line);
  border-radius: 9px; padding: 10px; font: inherit; font-size: 13px; outline: none;
}
.note-card textarea:focus { border-color: #4b9f7e; box-shadow: 0 0 0 3px #e0f1ea; }
.note-actions { display: flex; justify-content: flex-end; gap: 8px; }
.options-dialog {
  position: fixed; inset: 0; background: rgba(22, 32, 28, .48);
  display: grid; place-items: center; z-index: 94; padding: 20px;
}
.options-dialog.hidden { display: none; }
.options-card {
  width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: white; border-radius: 14px; box-shadow: var(--shadow); padding: 18px;
}
.options-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; margin-bottom: 16px;
}
.options-head h2 { margin: 3px 0 0; font-size: 20px; }
.option-toggle {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px;
  background: #f8faf9; margin-bottom: 16px; cursor: pointer;
}
.option-toggle strong { display: block; font-size: 13px; }
.option-toggle small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.option-toggle input { width: 18px; height: 18px; accent-color: var(--green); }
.options-section-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 10px;
}
.options-section-head strong { display: block; font-size: 13px; }
.options-section-head small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.options-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.options-metric {
  display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #f8faf9;
}
.options-metric span { font-size: 12px; font-weight: 700; }
.options-metric small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.options-metric .metric-input { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.options-metric input {
  width: 84px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font: inherit; background: white;
}
.options-table-wrap {
  border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 340px;
}
.options-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.options-table th, .options-table td { padding: 8px 10px; border-bottom: 1px solid #edf1ee; text-align: left; }
.options-table th { background: #f8faf9; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.options-table input[type="text"] {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font: inherit;
}
.options-table input[type="color"] {
  width: 42px; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 2px; background: white;
}
.options-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.import-dialog {
  position: fixed; inset: 0; background: rgba(22, 32, 28, .48);
  display: grid; place-items: center; z-index: 95; padding: 20px;
}
.import-dialog.hidden { display: none; }
.import-card {
  width: min(900px, 100%); max-height: calc(100vh - 40px); overflow: hidden;
  background: white; border-radius: 14px; box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column;
}
.import-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; flex: none;
}
.import-head h2 { margin: 3px 0 5px; font-size: 20px; }
.import-head p { margin: 0; color: var(--muted); font-size: 12px; }
.import-upload {
  margin-top: 18px; border: 2px dashed #bad0c5; border-radius: 12px;
  background: #f5faf7; min-height: 150px; display: grid; place-items: center;
  text-align: center;
}
.import-upload input { position: absolute; opacity: 0; pointer-events: none; }
.import-upload label { cursor: pointer; padding: 36px; }
.import-upload label strong {
  display: block; width: max-content; margin: 0 auto 8px; padding: 9px 16px;
  border-radius: 8px; background: var(--green); color: white; font-size: 12px;
}
.import-upload label span { color: var(--muted); font-size: 11px; }
.import-analyzing { padding: 60px 20px; text-align: center; color: var(--muted); }
.import-review { min-height: 0; margin-top: 16px; display: flex; flex-direction: column; }
.import-review.hidden { display: none; }
.import-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 13px; }
.import-summary span {
  padding: 6px 9px; border-radius: 7px; background: #eef2f0;
  color: var(--muted); font-size: 11px;
}
.import-summary span.ok { color: #0b6245; background: var(--green-soft); }
.import-summary span.warning { color: #875900; background: #fff2cf; }
.import-list-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.import-list-head strong { font-size: 12px; }
.import-list-head span { color: var(--muted); font-size: 10px; }
.import-pages {
  min-height: 150px; max-height: calc(100vh - 310px); overflow: auto;
  border: 1px solid var(--line); border-radius: 9px;
}
.import-page {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(220px, 38%);
  align-items: center; gap: 10px; min-height: 49px; padding: 6px 9px;
  border-bottom: 1px solid #e8ece9;
}
.import-page:last-child { border-bottom: 0; }
.import-page.review { background: #fffcf3; }
.import-page.unmatched { background: #fff6f6; }
.import-page-number {
  color: var(--muted); font-size: 10px; font-weight: 800; text-align: right;
  font-variant-numeric: tabular-nums;
}
.import-page-title { min-width: 0; }
.import-page-title strong, .import-page-title small {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.import-page-title strong { font-size: 11px; }
.import-page-title small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.import-page select, .import-page input {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 7px;
  background: white; font-size: 12px; padding: 0 8px;
}
.import-actions {
  display: flex; justify-content: flex-end; gap: 8px; padding-top: 13px; flex: none;
}

@media (max-width: 1000px) {
  .app-layout { grid-template-columns: 290px minmax(0, 1fr); }
  .sync { display: none; }
  .document-meta .badge { display: none; }
  .tool { padding: 0 7px; }
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .import-page { grid-template-columns: 28px minmax(0, 1fr) minmax(170px, 42%); }
}
@media (max-width: 760px) {
  .page-home .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .page-home .tool-cards { grid-template-columns: 1fr; }
  .page-home .summary-view { padding: 24px 18px; }
  .topbar .session-user { max-width: 88px; }
}

.page-ubicaciones { overflow: hidden; }
.ubic-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  background: var(--surface);
}
.ubic-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.ubic-block {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.ubic-block h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}
.ubic-block .help {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.ubic-fields {
  display: grid;
  gap: 10px;
}
.ubic-fields label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ubic-fields input,
.ubic-fields select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.ubic-fields input:focus,
.ubic-fields select:focus {
  border-color: #4b9f7e;
  box-shadow: 0 0 0 3px #e0f1ea;
  outline: none;
}
.ubic-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.ubic-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.ubic-count {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.ubic-list {
  flex: 1 1 auto;
  min-height: 120px;
  overflow: auto;
  background: #fafcfb;
}
.ubic-store {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: inherit;
}
.ubic-store:hover { background: var(--green-soft); }
.ubic-store[aria-current="true"] {
  background: #fff4e8;
  box-shadow: inset 3px 0 0 var(--orange);
}
.ubic-store strong { font-size: 13px; line-height: 1.35; }
.ubic-store small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.ubic-store small.missing { color: #9a4d00; font-weight: 600; }
.ubic-form {
  flex: none;
  max-height: min(46vh, 420px);
  overflow: auto;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.ubic-form .ubic-fields { padding: 14px 16px; }
.ubic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 8px;
}
.ubic-status {
  margin: 0;
  padding: 0 16px 14px;
  min-height: 2.5em;
  font-size: 13px;
  line-height: 1.4;
}
.ubic-status.ok { color: var(--green); font-weight: 600; }
.ubic-status.bad { color: var(--danger); font-weight: 600; }
.ubic-field-error {
  margin: -4px 0 0;
  font-size: 12px;
  color: var(--danger);
}
.ubic-field-error[hidden] { display: none; }
.ubic-map {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: #d9e2dc;
}
.page-ubicaciones #map {
  width: 100%;
  height: 100%;
  min-height: 280px;
}
.ubic-legend {
  position: absolute;
  z-index: 500;
  left: 14px;
  bottom: 14px;
  display: flex;
  gap: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  box-shadow: var(--shadow);
}
.ubic-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
}
.ubic-marker.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}
.ubic-marker svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .28));
}
.ubic-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.ubic-pin.selected {
  width: 20px;
  height: 20px;
  background: var(--orange);
}
.page-ubicaciones #map.placing { cursor: crosshair; }
.page-ubicaciones .filter-dialog { z-index: 2000; }
.page-ubicaciones .filter-bar { margin: 0; }
.page-ubicaciones .filter-chips { margin: 8px 0 0; }
.page-ubicaciones .filter-card { width: min(760px, 100%); }
@media (max-width: 900px) {
  .ubic-shell { grid-template-columns: 1fr; grid-template-rows: minmax(38vh, 1fr) minmax(42vh, 1fr); }
  .ubic-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .ubic-form { max-height: none; }
}
