:root {
  --navy-950: #06172a;
  --navy-900: #071c33;
  --navy-800: #0d2d4e;
  --blue-700: #075fba;
  --blue-600: #0878d1;
  --blue-100: #dbeeff;
  --cyan-500: #21c4dd;
  --green-500: #12b76a;
  --green-100: #dff7e9;
  --amber-500: #f59e0b;
  --red-500: #ef4444;
  --gray-950: #101828;
  --gray-700: #344054;
  --gray-600: #475467;
  --gray-500: #667085;
  --gray-400: #98a2b3;
  --gray-300: #d0d5dd;
  --gray-200: #e4e7ec;
  --gray-100: #f2f4f7;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --app-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --project-accent: #0878d1;
  --app-surface: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--gray-950);
  background: var(--gray-50);
  font-family: var(--app-font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  color: var(--white);
  background:
    radial-gradient(circle at 38% -80%, rgba(33, 196, 221, 0.42), transparent 42%),
    linear-gradient(110deg, var(--navy-950), var(--navy-800));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(6, 23, 42, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--navy-950);
  background: linear-gradient(145deg, #63e6f5, #22b5ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 20px;
  font-weight: 900;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 2px;
  color: #bdd2e7;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-action,
.topbar-icon-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.topbar-action:hover,
.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.topbar-icon-btn {
  width: 38px;
  padding: 0;
}

.user-profile-chip strong,
.user-profile-chip small {
  display: block;
}

.user-profile-chip strong {
  font-size: 11px;
}

.user-profile-chip small {
  margin-top: 2px;
  color: #bdd2e7;
  font-size: 9px;
}

.phase-chip,
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.cloud-sync-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #dbeeff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cloud-sync-chip .material-symbols-outlined {
  font-size: 17px;
}

.cloud-sync-chip.is-synced {
  color: #dff7e9;
  border-color: rgba(60, 226, 148, 0.42);
  background: rgba(18, 183, 106, 0.16);
}

.cloud-sync-chip.is-syncing,
.cloud-sync-chip.is-pending {
  color: #fff0c7;
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.14);
}

.cloud-sync-chip.is-conflict,
.cloud-sync-chip.is-offline {
  color: #ffe4e4;
  border-color: rgba(239, 68, 68, 0.44);
  background: rgba(239, 68, 68, 0.15);
}

@media (max-width: 980px) {
  .cloud-sync-chip span:last-child {
    display: none;
  }
}

.phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ce294;
  box-shadow: 0 0 0 4px rgba(60, 226, 148, 0.14);
}

.main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 34px 30px 48px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.page-description {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 750;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  box-shadow: 0 8px 18px rgba(7, 95, 186, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 11px 23px rgba(7, 95, 186, 0.3);
}

.btn-secondary {
  color: var(--gray-700);
  background: var(--white);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  min-height: 38px;
  color: var(--gray-600);
  background: transparent;
  border-color: var(--gray-200);
}

.btn-danger {
  color: #b42318;
  background: #fff5f4;
  border-color: #fecdca;
}

.icon-plus {
  font-size: 19px;
  line-height: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.summary-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--summary-glow, var(--blue-100));
  opacity: 0.72;
}

.summary-label {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 650;
}

.summary-number {
  margin-top: 8px;
  color: var(--navy-900);
  font-size: 29px;
  line-height: 1;
  font-weight: 850;
}

.summary-detail {
  margin-top: 9px;
  color: var(--gray-400);
  font-size: 11px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 520px;
}

.search-wrap span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-input,
.field-control {
  width: 100%;
  min-height: 44px;
  color: var(--gray-950);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 9px;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.search-input {
  padding: 0 14px 0 42px;
}

.field-control {
  padding: 10px 12px;
}

.search-input:focus,
.field-control:focus {
  border-color: #49a4ee;
  box-shadow: 0 0 0 4px rgba(8, 120, 209, 0.12);
}

textarea.field-control {
  min-height: 92px;
  resize: vertical;
}

.toolbar-info {
  color: var(--gray-500);
  font-size: 12px;
  white-space: nowrap;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border 0.18s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #b7d9f6;
  box-shadow: 0 14px 30px rgba(7, 28, 51, 0.11);
}

.project-map-preview {
  position: relative;
  height: 128px;
  overflow: hidden;
  background:
    linear-gradient(rgba(7, 28, 51, 0.12), rgba(7, 28, 51, 0.16)),
    repeating-linear-gradient(35deg, #cfdae2 0 2px, transparent 2px 34px),
    repeating-linear-gradient(125deg, #d8e5da 0 4px, #edf2eb 4px 38px);
}

.project-map-preview::before,
.project-map-preview::after {
  content: "";
  position: absolute;
  height: 5px;
  border-radius: 999px;
  background: var(--project-accent, var(--cyan-500));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.project-map-preview::before {
  width: 46%;
  left: 13%;
  top: 54%;
  transform: rotate(-7deg);
}

.project-map-preview::after {
  width: 29%;
  right: 15%;
  top: 42%;
  transform: rotate(22deg);
}

.map-pin {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--project-accent, var(--blue-700));
  box-shadow: 0 3px 10px rgba(7, 28, 51, 0.35);
}

.project-status {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #067647;
  background: rgba(236, 253, 243, 0.94);
  border: 1px solid #abefc6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-status.planificacion {
  color: #175cd3;
  background: #eff8ff;
  border-color: #b2ddff;
}

.project-status.archivado {
  color: var(--gray-600);
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.project-card-body {
  padding: 16px;
}

.project-code {
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-name {
  min-height: 44px;
  margin: 6px 0 4px;
  color: var(--navy-900);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
}

.project-place {
  color: var(--gray-500);
  font-size: 12px;
}

.project-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 15px;
}

.meta-box {
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--gray-50);
}

.meta-label {
  color: var(--gray-400);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-value {
  overflow: hidden;
  margin-top: 3px;
  color: var(--gray-700);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.project-actions .btn-primary {
  flex: 1;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.project-metrics span {
  min-width: 0;
  padding: 8px 5px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-500);
  background: var(--gray-50);
  font-size: 8px;
  text-align: center;
}

.project-metrics b {
  display: block;
  margin-bottom: 2px;
  color: var(--navy-900);
  font-size: 12px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 380px;
  padding: 55px 24px;
  text-align: center;
}

.empty-illustration {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid #b2ddff;
  border-radius: 28px;
  color: var(--blue-700);
  background: linear-gradient(145deg, #eff8ff, #dbeeff);
  font-size: 39px;
  transform: rotate(-3deg);
}

.empty-state h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 20px;
}

.empty-state p {
  max-width: 460px;
  margin: 9px 0 20px;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.55;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 15, 28, 0.68);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(2, 12, 27, 0.42);
  animation: modal-in 0.2s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 22px;
  color: var(--white);
  background: linear-gradient(110deg, var(--navy-950), var(--navy-800));
}

.modal-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.modal-subtitle {
  margin-top: 4px;
  color: #bfd3e7;
  font-size: 11px;
}

.modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 19px;
}

.modal-content {
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  padding: 22px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 22px;
}

.form-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 850;
}

.section-number {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue-700);
  font-size: 11px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.field {
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--gray-600);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.required {
  color: var(--red-500);
}

.field-help {
  margin: 5px 0 0;
  color: var(--gray-400);
  font-size: 10px;
  line-height: 1.4;
}

.location-box {
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-50);
}

.coordinates-row {
  display: grid;
  grid-template-columns: 1fr 1fr 90px;
  gap: 9px;
  margin-bottom: 10px;
}

#locationMap {
  width: 100%;
  height: 335px;
  overflow: hidden;
  border: 1px solid var(--gray-300);
  border-radius: 11px;
  background: #dfe8ed;
}

.map-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 9px;
  color: var(--gray-500);
  font-size: 10px;
}

.coordinate-badge {
  padding: 5px 8px;
  border-radius: 7px;
  color: #175cd3;
  background: #eff8ff;
  font-weight: 750;
  white-space: nowrap;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 22px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.footer-note {
  color: var(--gray-500);
  font-size: 10px;
}

.footer-actions {
  display: flex;
  gap: 10px;
}

.toast-stack {
  position: fixed;
  z-index: 4000;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 290px;
  max-width: 380px;
  padding: 13px 15px;
  color: var(--white);
  background: var(--navy-900);
  border-left: 4px solid var(--green-500);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 12px;
  animation: toast-in 0.2s ease-out;
}

.toast.error {
  border-left-color: var(--red-500);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

.workspace-screen {
  min-height: calc(100vh - 72px);
  background: #e8eef2;
}

.workspace-toolbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.active-layer-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 9px;
  color: var(--gray-600);
  background: var(--gray-50);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-construction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #067647;
  border: 1px solid #75e0a7;
  background: #ecfdf3;
}

.btn-construction:hover:not(:disabled) {
  background: #d1fadf;
}

.btn-construction:disabled {
  color: var(--gray-400);
  border-color: var(--gray-200);
  background: var(--gray-100);
  cursor: not-allowed;
}

.workspace-title {
  flex: 1;
  min-width: 0;
}

.workspace-title strong,
.workspace-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-title strong {
  color: var(--navy-900);
  font-size: 14px;
}

.workspace-title span {
  margin-top: 2px;
  color: var(--gray-500);
  font-size: 10px;
}

.workspace-body {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: calc(100vh - 136px);
}

.layers-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
}

.layers-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 16px 14px;
  border-bottom: 1px solid var(--gray-200);
}

.layers-heading h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layers-heading span {
  display: block;
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 10px;
}

.layer-add-shortcut {
  width: 34px;
  height: 34px;
  border: 1px solid #b2ddff;
  border-radius: 9px;
  color: #026aa2;
  background: #eff8ff;
  font-size: 19px;
  cursor: pointer;
}

.project-location-layer {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 12px 12px 0;
  padding: 9px;
  border: 1px solid #84caff;
  border-radius: 11px;
  background: linear-gradient(135deg, #f5faff, #ffffff);
  box-shadow: 0 5px 15px rgba(8, 120, 209, 0.08);
}

.project-location-layer.is-hidden {
  opacity: 0.55;
}

.project-location-layer-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--project-location-color, #0878d1) 35%, white);
  border-radius: 10px;
  color: var(--project-location-color, #0878d1);
  background: color-mix(in srgb, var(--project-location-color, #0878d1) 11%, white);
  font-size: 20px;
}

.project-location-layer-main {
  min-width: 0;
}

.project-location-layer-main strong,
.project-location-layer-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-location-layer-main strong {
  color: var(--navy-900);
  font-size: 10px;
}

.project-location-layer-main span {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 8px;
}

.project-location-layer-actions {
  display: grid;
  grid-template-columns: repeat(3, 24px);
  gap: 3px;
}

.project-location-layer-actions button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--gray-600);
  background: var(--gray-50);
  cursor: pointer;
}

.project-location-layer-actions button:hover {
  color: #0874c9;
  background: #eaf4ff;
}

.project-location-layer-actions .material-symbols-outlined {
  font-size: 14px;
}

.layers-panel {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

.layers-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 12px;
  color: var(--gray-500);
  text-align: center;
}

.layers-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 14px;
  color: #0874c9;
  background: #eaf4ff;
  font-size: 23px;
}

.layers-empty strong {
  color: var(--navy-900);
  font-size: 13px;
}

.layers-empty span {
  margin: 7px 0 14px;
  font-size: 10px;
  line-height: 1.45;
}

.btn-small {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 10px;
}

.layer-group + .layer-group {
  margin-top: 16px;
}

.layer-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px 7px;
  color: var(--gray-600);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.layer-group-title > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.layer-group-title .material-symbols-outlined {
  font-size: 15px;
}

.layer-group-title b {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 9px;
}

.layer-row {
  display: grid;
  grid-template-columns: 16px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  margin-bottom: 7px;
  padding: 8px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.layer-row:hover {
  border-color: #b2ddff;
}

.layer-row.is-active {
  border-color: #53b1fd;
  background: #f5faff;
  box-shadow: 0 0 0 2px rgba(83, 177, 253, 0.12);
}

.layer-row.is-hidden {
  opacity: 0.48;
}

.layer-type-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--layer-color) 30%, white);
  border-radius: 10px;
  color: var(--layer-color);
  background: color-mix(in srgb, var(--layer-color) 11%, white);
}

.layer-type-icon .material-symbols-outlined {
  font-size: 20px;
}

.layer-main {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.layer-main strong,
.layer-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-main strong {
  color: var(--navy-900);
  font-size: 11px;
}

.layer-main span {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 8px;
}

.layer-buttons {
  display: grid;
  grid-template-columns: repeat(3, 24px);
  gap: 3px;
}

.layer-buttons button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--gray-600);
  background: var(--gray-50);
  cursor: pointer;
  font-size: 11px;
}

.layer-buttons .material-symbols-outlined {
  font-size: 14px;
}

.layer-buttons button:hover {
  color: #0874c9;
  background: #eaf4ff;
}

.phase-note {
  margin: 0 12px 12px;
  padding: 10px;
  border: 1px dashed #b2ddff;
  border-radius: 9px;
  color: #175cd3;
  background: #f5faff;
  font-size: 9px;
  line-height: 1.45;
}

.modal-compact {
  max-width: 720px;
}

.layer-modal-content {
  max-height: calc(100vh - 220px);
}

.color-control {
  height: 44px;
  padding: 4px;
  cursor: pointer;
}

.map-stage {
  position: relative;
  min-width: 0;
}

.map-zoom-status {
  position: absolute;
  z-index: 900;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 18px;
  color: var(--navy-900);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(7, 28, 51, 0.14);
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}

.map-zoom-status .material-symbols-outlined {
  color: #0878d1;
  font-size: 16px;
}

.map-history-controls {
  position: absolute;
  z-index: 900;
  top: 56px;
  right: 12px;
  display: flex;
  gap: 6px;
}

.map-history-controls button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 18px;
  color: var(--navy-900);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(7, 28, 51, 0.14);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.map-history-controls button:disabled {
  opacity: 0.42;
  cursor: default;
}

.map-history-controls .material-symbols-outlined {
  color: #0878d1;
  font-size: 16px;
}

.element-radial-menu {
  position: absolute;
  z-index: 1200;
  display: grid;
  grid-template-columns: repeat(4, 54px);
  gap: 6px;
  padding: 7px;
  transform: translate(-50%, calc(-100% - 18px));
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 15px 38px rgba(7, 28, 51, 0.24);
}

.element-radial-menu::after {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid #d0d5dd;
  border-bottom: 1px solid #d0d5dd;
  background: #ffffff;
  content: "";
}

.element-radial-menu button {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  color: var(--gray-600);
  background: var(--gray-50);
  cursor: pointer;
}

.element-radial-menu button:hover {
  color: #0874c9;
  background: #eaf4ff;
}

.element-radial-menu button.is-danger:hover {
  color: #b42318;
  background: #fef3f2;
}

.element-radial-menu .material-symbols-outlined {
  font-size: 19px;
}

.element-radial-menu small {
  font-size: 8px;
  font-weight: 700;
}

/*
  Leaflet enfoca las rutas SVG al pulsarlas. El contorno nativo sigue la caja
  completa de la geometría y parece un polígono negro sobre el mapa. La ruta
  seleccionada se comunica mediante un halo, sin dibujar esa caja engañosa.
*/
.leaflet-overlay-pane .network-path:focus {
  outline: none;
}

.leaflet-overlay-pane .network-path.is-network-element-selected {
  filter: drop-shadow(0 0 4px rgba(8, 120, 209, 0.88));
}

.drawing-banner {
  position: absolute;
  z-index: 1100;
  top: 14px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(620px, calc(100% - 30px));
  padding: 12px 13px;
  transform: translateX(-50%);
  border: 1px solid #84caff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 32px rgba(7, 28, 51, 0.2);
}

.drawing-banner strong,
.drawing-banner span {
  display: block;
}

.drawing-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.drawing-metrics b {
  padding: 4px 7px;
  border-radius: 12px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 9px;
  white-space: nowrap;
}

.drawing-measure-tooltip {
  position: absolute;
  z-index: 1250;
  min-width: 64px;
  padding: 5px 8px;
  transform: translate(12px, -34px);
  border: 1px solid #84caff;
  border-radius: 10px;
  color: #175cd3;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(7, 28, 51, 0.16);
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}

.element-info-panel {
  position: absolute;
  z-index: 1300;
  top: 12px;
  right: 12px;
  width: min(350px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 48px rgba(7, 28, 51, 0.24);
}

.element-info-panel header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #ffffff;
  background: #071c33;
}

.element-info-panel header span,
.element-info-panel header strong {
  display: block;
}

.element-info-panel header span {
  color: #b2ddff;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.element-info-panel header strong {
  margin-top: 3px;
  font-size: 14px;
}

.element-info-panel header button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.element-info-content {
  padding: 14px 16px 18px;
}

.element-info-content .network-popup {
  min-width: 0;
}

.element-info-content .network-popup > strong {
  display: none;
}

.drawing-banner strong {
  color: var(--navy-900);
  font-size: 12px;
}

.drawing-banner span {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 10px;
}

.drawing-banner-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.element-context {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
  padding: 12px;
  border: 1px solid #b2ddff;
  border-radius: 11px;
  background: #f5faff;
}

.element-context > .material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--white);
  font-size: 25px;
}

.element-context strong,
.element-context div > span {
  display: block;
}

.element-context strong {
  color: var(--navy-900);
  font-size: 12px;
}

.element-context div > span {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 10px;
}

.fiber-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 13px;
  border: 1px solid var(--gray-200);
  border-radius: 11px;
  background: var(--gray-50);
}

.element-appearance {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 13px;
  border: 1px solid #b2ddff;
  border-radius: 11px;
  background: #f5faff;
}

.inline-color-control {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
}

.inline-color-control input[type="color"] {
  width: 46px;
  height: 32px;
  padding: 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.inline-color-control span {
  color: var(--gray-600);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.compact-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--gray-600);
  font-size: 10px;
  cursor: pointer;
}

.compact-check input,
.setting-check input {
  accent-color: #0878d1;
}

.setting-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 9px;
  background: var(--gray-50);
  cursor: pointer;
}

.setting-check.full {
  grid-column: 1 / -1;
}

.setting-check strong,
.setting-check small {
  display: block;
}

.setting-check strong {
  color: var(--navy-900);
  font-size: 11px;
}

.setting-check small {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 9px;
  line-height: 1.4;
}

.element-list {
  margin: -3px 0 9px 10px;
  padding: 5px 0 2px 10px;
  border-left: 2px solid #b2ddff;
}

.element-empty {
  margin: -2px 3px 9px 12px;
  padding: 8px 9px;
  border-left: 2px solid #b2ddff;
  color: var(--gray-500);
  font-size: 9px;
  line-height: 1.4;
}

.element-row {
  display: grid;
  grid-template-columns: 14px 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  padding: 7px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
}

.element-row.is-hidden {
  opacity: 0.5;
}

.element-icon {
  display: grid;
  place-items: center;
}

.element-icon .material-symbols-outlined {
  font-size: 18px;
}

.element-main {
  min-width: 0;
}

.element-main strong,
.element-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.element-main strong {
  color: var(--navy-900);
  font-size: 9px;
}

.element-main span {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 8px;
}

.element-actions {
  display: flex;
  flex: 0 0 70px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
}

.element-actions button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--gray-500);
  background: var(--gray-50);
}

.element-actions .material-symbols-outlined {
  font-size: 13px;
}

.layer-drag-handle,
.element-drag-handle {
  color: var(--gray-400);
  cursor: grab;
  font-size: 16px !important;
  user-select: none;
}

.category-drag-handle {
  margin-right: -3px;
  font-size: 14px !important;
}

.layer-drag-handle:active,
.element-drag-handle:active {
  cursor: grabbing;
}

.layer-row.is-dragging,
.element-row.is-dragging,
.layer-group-title.is-dragging {
  opacity: 0.38;
}

.layer-row.is-drop-target,
.layer-group.is-drop-target {
  border-color: #12b76a;
  background: #ecfdf3;
  box-shadow: 0 0 0 2px rgba(18, 183, 106, 0.14);
}

.layer-row.is-drop-invalid {
  border-color: #f04438;
  background: #fff4f3;
}

.modal-mini {
  max-width: 520px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast > button {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.connection-mode-options {
  display: grid;
  gap: 10px;
}

.connection-mode-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  color: var(--navy-900);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.connection-mode-card:hover {
  border-color: #53b1fd;
  background: #f5faff;
}

.connection-mode-card > .material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #0878d1;
  background: #eaf4ff;
}

.connection-mode-card strong,
.connection-mode-card small {
  display: block;
}

.pole-planner-modal {
  max-width: 820px;
}

.pole-planner-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.pole-planner-summary > div {
  padding: 13px;
  border: 1px solid #dbe8f5;
  border-radius: 12px;
  background: #f8fbff;
}

.pole-planner-summary span,
.pole-planner-summary strong {
  display: block;
}

.pole-planner-summary span {
  color: var(--gray-500);
  font-size: 9px;
  text-transform: uppercase;
}

.pole-planner-summary strong {
  margin-top: 5px;
  color: #0878d1;
  font-size: 19px;
}

.pole-planner-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #b2ddff;
  border-radius: 10px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 10px;
}

.pole-planner-note .material-symbols-outlined {
  font-size: 18px;
}

@media (max-width: 760px) {
  .element-info-panel {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: 58%;
    border-radius: 18px 18px 12px 12px;
  }

  .drawing-banner {
    align-items: stretch;
  }

  .drawing-banner-actions {
    flex-wrap: wrap;
  }

  .pole-planner-summary {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   FASE 2.4–2.6 · EDITOR INTERNO FTTH
   ========================================================= */

.point-technical-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid #b2ddff;
  border-radius: 12px;
  background: #f5faff;
}

.point-technical-fields.hidden {
  display: none;
}

.point-technical-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #175cd3;
  font-size: 9px;
  line-height: 1.45;
}

.point-technical-note .material-symbols-outlined {
  font-size: 18px;
}

.ftth-editor-backdrop {
  padding: 12px;
}

.ftth-editor-modal {
  display: flex;
  flex-direction: column;
  width: min(1580px, 98vw);
  max-width: none;
  height: min(930px, 96vh);
  max-height: none;
  overflow: hidden;
}

.ftth-editor-header {
  flex: 0 0 auto;
  min-height: 82px;
}

.ftth-editor-stats {
  display: flex;
  gap: 8px;
  margin-left: auto;
  margin-right: 48px;
}

.ftth-editor-stats span {
  min-width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--gray-500);
  background: var(--white);
  font-size: 8px;
  text-align: center;
}

.ftth-editor-stats b {
  display: block;
  margin-bottom: 2px;
  color: #0878d1;
  font-size: 17px;
}

.ftth-editor-stats .is-warning {
  border-color: #fedf89;
  background: #fffaeb;
}

.ftth-editor-stats .is-warning b {
  color: #dc6803;
}

.ftth-editor-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 7px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--gray-200);
  background: #f8fafc;
}

.ftth-toolbar-label {
  margin-right: 4px;
  color: var(--gray-500);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.ftth-editor-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-700);
  background: var(--white);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.ftth-editor-toolbar button:hover,
.ftth-editor-toolbar button.is-primary {
  border-color: #84caff;
  color: #175cd3;
  background: #eff8ff;
}

.ftth-editor-toolbar .material-symbols-outlined {
  font-size: 15px;
}

.ftth-toolbar-select {
  display: grid;
  grid-template-columns: auto minmax(105px, 150px);
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 5px 3px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-500);
  background: var(--white);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.ftth-toolbar-select select {
  min-width: 0;
  height: 23px;
  border: 0;
  color: var(--navy-900);
  background: transparent;
  font-size: 8px;
  font-weight: 750;
  outline: 0;
}

.ftth-diagram-body {
  position: relative;
  display: grid;
  grid-template-columns: 310px minmax(620px, 1fr) 290px;
  flex: 1;
  height: 0;
  min-height: 0;
  overflow: hidden;
  background: #f8fafc;
}

.ftth-cable-panel,
.ftth-inspector,
.ftth-workspace {
  position: relative;
  z-index: 2;
  min-height: 0;
  overflow: auto;
}

.ftth-cable-panel,
.ftth-inspector {
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.ftth-cable-panel {
  border-right: 1px solid var(--gray-200);
}

.ftth-inspector {
  border-left: 1px solid var(--gray-200);
}

.ftth-workspace {
  padding: 18px;
}

.ftth-panel-title {
  margin-bottom: 10px;
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ftth-cable-tabs {
  display: flex;
  gap: 5px;
  margin: -2px 0 9px;
  padding-bottom: 3px;
  overflow-x: auto;
}

.ftth-cable-tabs button {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-600);
  background: var(--white);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.ftth-cable-tabs button.is-active {
  border-color: #53b1fd;
  color: #175cd3;
  background: #eff8ff;
}

.ftth-cable-card {
  margin-bottom: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 11px;
  background: var(--white);
  overflow: hidden;
}

.ftth-cable-heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 10px;
  color: #175cd3;
  background: #f5faff;
}

.ftth-cable-heading .material-symbols-outlined {
  font-size: 20px;
}

.ftth-cable-heading strong,
.ftth-cable-heading small {
  display: block;
}

.ftth-cable-heading strong {
  color: var(--navy-900);
  font-size: 10px;
}

.ftth-cable-heading small {
  margin-top: 2px;
  color: var(--gray-500);
  font-size: 8px;
}

.ftth-strand-list {
  max-height: 410px;
  overflow: auto;
}

.ftth-strand-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 7px;
  border-top: 1px solid #f2f4f7;
  font-size: 8px;
}

.ftth-strand-row > i {
  width: 7px;
  height: 18px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 6px;
  background: var(--strand-color);
}

.ftth-port {
  position: relative;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 20px;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--port-color) 50%, #d0d5dd);
  border-radius: 10px;
  color: color-mix(in srgb, var(--port-color) 80%, #101828);
  background: var(--white);
  font-size: 7px;
  font-weight: 800;
  cursor: grab;
}

.ftth-port::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--port-color);
}

.ftth-port.is-cable-port::before {
  display: none;
}

.ftth-port.is-used {
  color: #067647;
  background: #ecfdf3;
}

.ftth-port.is-selected,
.ftth-port.is-drop-target {
  outline: 3px solid rgba(83, 177, 253, 0.26);
  transform: scale(1.08);
}

.ftth-port.is-reserved {
  border-color: #fdb022;
  color: #b54708;
  background: #fffaeb;
}

.ftth-port.is-fault {
  border-color: #f04438;
  color: #b42318;
  background: #fef3f2;
}

.ftth-port.is-laser {
  border-color: #ff2d55;
  color: #c01048;
  background: #fff1f3;
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.18), 0 0 16px rgba(255, 45, 85, 0.55);
  animation: ftth-laser-pulse 0.9s ease-in-out infinite alternate;
}

.ftth-links-svg {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}

.ftth-links-svg path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.72;
  pointer-events: stroke;
  cursor: pointer;
}

.ftth-links-svg path.is-laser {
  stroke: #ff2d55;
  stroke-width: 5;
  stroke-dasharray: 9 7;
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(255, 45, 85, 0.85));
  animation: ftth-laser-flow 0.65s linear infinite;
}

.ftth-links-svg path.is-fault {
  stroke: #d92d20;
  stroke-width: 4;
  stroke-dasharray: 4 6;
}

@keyframes ftth-laser-flow {
  to { stroke-dashoffset: -32; }
}

@keyframes ftth-laser-pulse {
  to { transform: scale(1.13); }
}

.ftth-links-svg path.is-selected {
  stroke-width: 4;
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(8, 120, 209, 0.45));
}

.ftth-workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.ftth-workspace-heading strong,
.ftth-workspace-heading span {
  display: block;
}

.ftth-workspace-heading strong {
  color: var(--navy-900);
  font-size: 14px;
}

.ftth-workspace-heading span,
.ftth-workspace-heading b {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 9px;
}

.ftth-odf-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  gap: 8px;
}

.ftth-odf-port {
  display: grid;
  place-items: center;
  min-height: 78px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
}

.ftth-odf-port > span {
  color: var(--navy-900);
  font-size: 10px;
  font-weight: 800;
}

.ftth-odf-port > small {
  color: var(--gray-400);
  font-size: 7px;
}

.ftth-odf-port .ftth-port {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 50%;
}

.ftth-tray {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #b2ddff;
  border-radius: 16px;
  background: #f8fbff;
}

.ftth-tray-heading {
  display: flex;
  justify-content: space-between;
  padding-bottom: 9px;
  color: var(--gray-600);
  font-size: 9px;
}

.ftth-splice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 6px 12px;
}

.ftth-splice-row {
  display: grid;
  grid-template-columns: 34px 38px minmax(20px, 1fr) 38px;
  align-items: center;
  gap: 5px;
  min-height: 33px;
  padding: 4px 7px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: var(--white);
}

.ftth-splice-row > span {
  font-size: 8px;
  font-weight: 800;
}

.ftth-splice-row > i {
  height: 2px;
  background: #98a2b3;
}

.ftth-box-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 260px;
  gap: 14px;
  align-items: start;
}

.ftth-splitters-area {
  display: grid;
  gap: 12px;
}

.ftth-splitter-card {
  padding: 12px;
  border: 1px solid #b2ddff;
  border-radius: 13px;
  background: var(--white);
}

.ftth-splitter-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ftth-splitter-card header strong,
.ftth-splitter-card header small {
  display: block;
}

.ftth-splitter-card header strong {
  font-size: 11px;
}

.ftth-splitter-card header small {
  margin-top: 2px;
  color: var(--gray-500);
  font-size: 8px;
}

.ftth-splitter-card header button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  color: #175cd3;
  background: #eff8ff;
  cursor: pointer;
}

.ftth-splitter-actions {
  display: flex;
  gap: 5px;
}

.ftth-port-menu {
  position: fixed;
  z-index: 10050;
  width: 230px;
  overflow: hidden;
  border: 1px solid #b2ddff;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(7, 28, 51, 0.26);
}

.ftth-port-menu header {
  padding: 10px 12px;
  color: #ffffff;
  background: #071c33;
}

.ftth-port-menu header strong,
.ftth-port-menu header small {
  display: block;
}

.ftth-port-menu header strong {
  font-size: 10px;
}

.ftth-port-menu header small {
  margin-top: 3px;
  color: #b2ddff;
  font-size: 7px;
}

.ftth-port-menu > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
}

.ftth-port-menu button {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 37px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  color: #344054;
  background: #f2f4f7;
  font-size: 7px;
  font-weight: 800;
  cursor: pointer;
}

.ftth-port-menu button:hover {
  color: #175cd3;
  background: #eff8ff;
}

.ftth-port-menu button.is-danger {
  color: #b42318;
  background: #fef3f2;
}

.ftth-port-menu .material-symbols-outlined {
  font-size: 16px;
}

.ftth-diagnostics {
  display: grid;
  gap: 6px;
}

.ftth-diagnostics > div {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  color: #344054;
  background: #f2f4f7;
}

.ftth-diagnostics > div.is-success { color: #067647; background: #ecfdf3; }
.ftth-diagnostics > div.is-warning { color: #b54708; background: #fffaeb; }
.ftth-diagnostics > div.is-danger { color: #b42318; background: #fef3f2; }
.ftth-diagnostics > div.is-info { color: #175cd3; background: #eff8ff; }

.ftth-diagnostics .material-symbols-outlined { font-size: 17px; }
.ftth-diagnostics p { margin: 0; font-size: 8px; line-height: 1.4; }

.ftth-diagnostic-note {
  margin: 8px 0 0;
  color: #667085;
  font-size: 7px;
  line-height: 1.45;
}

.ftth-editor-toolbar button:disabled {
  opacity: 0.4;
  cursor: default;
}

.ftth-editor-toolbar button.is-danger {
  border-color: #fecdca;
  color: #b42318;
  background: #fef3f2;
}

.ftth-splitter-body {
  display: grid;
  grid-template-columns: 75px 72px minmax(170px, 1fr);
  align-items: center;
  gap: 10px;
}

.ftth-splitter-input,
.ftth-splitter-outputs > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 26px;
  font-size: 8px;
}

.ftth-splitter-symbol {
  display: grid;
  place-items: center;
  width: 70px;
  height: 80px;
  border: 2px solid #0878d1;
  border-radius: 9px;
  color: #175cd3;
  background: #f5faff;
  font-size: 14px;
  font-weight: 800;
  transform: rotate(var(--splitter-rotation));
}

.ftth-splitter-outputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(45px, 1fr));
  gap: 3px 8px;
}

.ftth-client-panel {
  padding: 11px;
  border: 1px solid #d1fadf;
  border-radius: 12px;
  background: #f6fef9;
}

.ftth-client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.ftth-client-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 28px;
  padding: 4px 5px;
  border: 1px solid #d1fadf;
  border-radius: 7px;
  background: var(--white);
  font-size: 7px;
}

.ftth-budget-warning {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #fedf89;
  border-radius: 10px;
  color: #b54708;
  background: #fffaeb;
}

.ftth-budget-warning strong,
.ftth-budget-warning small {
  display: block;
}

.ftth-budget-warning strong {
  font-size: 10px;
}

.ftth-budget-warning small {
  margin-top: 2px;
  font-size: 8px;
}

.ftth-link-list {
  margin-top: 16px;
}

.ftth-link-list > button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  margin-bottom: 5px;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-700);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.ftth-link-list > button.is-selected {
  border-color: #53b1fd;
  background: #f5faff;
}

.ftth-link-list b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #175cd3;
  background: #eff8ff;
  font-size: 8px;
}

.ftth-link-list span,
.ftth-link-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
}

.ftth-link-list small {
  color: var(--gray-500);
}

.ftth-inspector .field {
  margin-bottom: 10px;
}

.ftth-inspector-route {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid #b2ddff;
  border-radius: 10px;
  color: #175cd3;
  background: #f5faff;
  font-size: 9px;
}

.ftth-inspector-route i {
  color: var(--gray-400);
  font-style: normal;
}

.btn-block {
  width: 100%;
  margin-top: 7px;
}

.btn-danger-soft {
  border-color: #fecdca;
  color: #b42318;
  background: #fff4f3;
}

.ftth-selected-port {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 9px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 9px;
}

.ftth-trace-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.ftth-trace-summary > div {
  padding: 8px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
}

.ftth-trace-summary span,
.ftth-trace-summary b {
  display: block;
}

.ftth-trace-summary span {
  color: var(--gray-500);
  font-size: 7px;
}

.ftth-trace-summary b {
  margin-top: 4px;
  font-size: 11px;
}

.ftth-trace-list {
  padding-left: 20px;
  color: var(--gray-600);
}

.ftth-trace-list li {
  margin-bottom: 8px;
  font-size: 8px;
}

.ftth-trace-list strong,
.ftth-trace-list span {
  display: block;
}

.ftth-trace-list span {
  margin-top: 2px;
  color: var(--gray-500);
}

.ftth-inspector-overview {
  padding: 16px 8px;
  color: var(--gray-500);
  text-align: center;
}

.ftth-inspector-overview .material-symbols-outlined {
  display: block;
  margin-bottom: 8px;
  color: #0878d1;
  font-size: 34px;
}

.ftth-inspector-overview strong {
  display: block;
  color: var(--navy-900);
  font-size: 12px;
}

.ftth-inspector-overview p {
  font-size: 9px;
  line-height: 1.5;
}

.ftth-inspector dl > div {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 8px;
}

.ftth-inspector dt {
  color: var(--gray-500);
}

.ftth-inspector dd {
  margin: 0;
  color: var(--navy-900);
  font-weight: 800;
}

.ftth-empty {
  padding: 14px;
  border: 1px dashed var(--gray-300);
  border-radius: 9px;
  color: var(--gray-500);
  background: #fcfcfd;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.ftth-empty-large {
  min-height: 160px;
  display: grid;
  place-items: center;
}

.ftth-editor-footer {
  flex: 0 0 auto;
  min-height: 66px;
}

/* =========================================================
   FASE 2.8 · DIAGRAMAS FÍSICOS POR BANDEJAS
   ========================================================= */

.ftth-tray-deck {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-height: 52px;
  padding: 0 16px;
  overflow-x: auto;
}

.ftth-tray-tab {
  position: relative;
  min-width: 145px;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #98a2b3;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  color: var(--gray-600);
  background: #d0d5dd;
  text-align: left;
  cursor: pointer;
  transform: translateY(6px);
}

.ftth-tray-tab:nth-child(n + 2) {
  margin-left: -24px;
}

.ftth-tray-tab span,
.ftth-tray-tab small {
  display: block;
}

.ftth-tray-tab span {
  font-size: 9px;
  font-weight: 850;
}

.ftth-tray-tab small {
  margin-top: 3px;
  font-size: 7px;
}

.ftth-tray-tab.is-active {
  z-index: 5;
  min-height: 47px;
  border-color: #53b1fd;
  color: #175cd3;
  background: #eff8ff;
  box-shadow: 0 -4px 12px rgba(8, 120, 209, 0.12);
  transform: none;
}

.ftth-enclosure {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  min-height: 390px;
  padding: 18px;
  border: 8px solid #344054;
  border-radius: 34px;
  background: linear-gradient(145deg, #475467, #101828);
  box-shadow: inset 0 0 0 3px #667085, 0 12px 30px rgba(16, 24, 40, 0.18);
}

.ftth-enclosure-mufa {
  border-radius: 42px 42px 30px 30px;
}

.ftth-enclosure-lid {
  display: grid;
  place-content: center;
  min-height: 160px;
  padding: 14px;
  border: 2px solid #667085;
  border-radius: 22px;
  color: #d0d5dd;
  background: linear-gradient(150deg, #1d2939, #101828);
  text-align: center;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.05);
}

.ftth-enclosure-lid span,
.ftth-enclosure-lid small {
  display: block;
}

.ftth-enclosure-lid span {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ftth-enclosure-lid small {
  margin-top: 6px;
  color: #98a2b3;
  font-size: 8px;
}

.ftth-active-tray {
  min-width: 0;
  padding: 15px;
  border: 4px solid #98a2b3;
  border-radius: 25px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 2px #d0d5dd, 0 6px 18px rgba(0, 0, 0, 0.22);
}

.ftth-physical-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 12px;
  align-items: start;
}

.ftth-enclosure-box .ftth-physical-grid {
  grid-template-columns: minmax(380px, 1.25fr) minmax(280px, 0.75fr);
}

.ftth-component-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #344054;
  background: #e4e7ec;
}

.ftth-component-title strong,
.ftth-component-title small {
  font-size: 8px;
}

.ftth-active-tray .ftth-splice-grid {
  grid-template-columns: 1fr;
}

.ftth-splitter-outputs > div.has-client {
  padding: 2px 4px;
  border-radius: 7px;
  background: #ecfdf3;
}

.ftth-splitter-outputs > div > span small {
  display: block;
  max-width: 72px;
  overflow: hidden;
  color: #067647;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ftth-port.is-powered {
  border-color: #2e90fa;
  color: #175cd3;
  background: #eff8ff;
  box-shadow: 0 0 0 2px rgba(83, 177, 253, 0.13);
}

.ftth-power-value {
  display: block;
  margin-left: 3px;
  color: #0878d1;
  font-size: 6px;
  white-space: nowrap;
}

.ftth-power-reading {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 7px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--gray-500);
  background: #f9fafb;
}

.ftth-power-reading > span {
  grid-row: 1 / span 2;
  font-size: 22px;
}

.ftth-power-reading strong {
  color: var(--gray-700);
  font-size: 13px;
}

.ftth-power-reading small {
  font-size: 7px;
}

.ftth-power-reading.is-powered {
  border-color: #84caff;
  color: #0ba5ec;
  background: #f0f9ff;
}

.ftth-power-reading.is-powered strong {
  color: #175cd3;
}

.ftth-inspector-section {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

@media (max-width: 1100px) {
  .ftth-diagram-body {
    grid-template-columns: 260px minmax(560px, 1fr) 260px;
    overflow: auto;
  }

  .ftth-editor-stats {
    display: none;
  }
}

@media (max-width: 760px) {
  .point-technical-fields {
    grid-template-columns: 1fr;
  }

  .ftth-editor-backdrop {
    padding: 0;
  }

  .ftth-editor-modal {
    width: 100vw;
    height: 100vh;
  }

  .ftth-diagram-body {
    display: block;
    overflow: auto;
  }

  .ftth-cable-panel,
  .ftth-inspector,
  .ftth-workspace {
    overflow: visible;
    border: 0;
  }

  .ftth-links-svg {
    display: none;
  }

  .ftth-odf-grid {
    grid-template-columns: repeat(3, minmax(70px, 1fr));
  }

  .ftth-box-layout,
  .ftth-splice-grid,
  .ftth-physical-grid,
  .ftth-enclosure,
  .ftth-enclosure-box .ftth-physical-grid {
    grid-template-columns: 1fr;
  }

  .ftth-enclosure-lid {
    min-height: 80px;
  }
}

.connection-mode-card strong {
  font-size: 12px;
}

.connection-mode-card small {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 10px;
  line-height: 1.4;
}

.network-marker-wrapper,
.project-center-wrapper {
  background: transparent;
  border: 0;
}

.network-marker {
  display: grid;
  place-items: center;
  width: var(--marker-size, 34px);
  height: var(--marker-size, 34px);
  border: clamp(2px, calc(var(--marker-size, 34px) / 12), 3px) solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--marker-color);
  box-shadow: 0 5px 14px rgba(7, 28, 51, 0.32);
}

.network-marker .material-symbols-outlined {
  font-size: clamp(12px, calc(var(--marker-size, 34px) * 0.58), 20px);
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.project-center-icon {
  display: grid;
  place-items: center;
  width: var(--project-location-size, 30px);
  height: var(--project-location-size, 30px);
  border: 3px solid var(--white);
  border-radius: 50% 50% 50% 9px;
  color: var(--white);
  background: var(--project-location-color, #0878d1);
  box-shadow: 0 5px 14px rgba(7, 28, 51, 0.32);
  transform: rotate(-45deg);
}

.project-center-icon .material-symbols-outlined {
  font-size: clamp(12px, calc(var(--project-location-size, 30px) * 0.58), 19px);
  transform: rotate(45deg);
}

.network-popup {
  min-width: 150px;
  line-height: 1.5;
}

#projectMap {
  width: 100%;
  height: calc(100vh - 136px);
  min-height: 520px;
  background: #dfe8ed;
}

@media (max-width: 1050px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-layout {
    grid-template-columns: 1fr;
  }

  #locationMap {
    height: 300px;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 16px;
  }

  .phase-chip,
  .user-chip {
    display: none;
  }

  .main {
    padding: 24px 14px 38px;
  }

  .page-heading,
  .panel-toolbar,
  .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .form-grid,
  .coordinates-row {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal {
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
  }

  .modal-content {
    max-height: calc(100vh - 162px);
    padding: 16px;
  }

  .footer-actions,
  .footer-actions .btn {
    width: 100%;
  }

  .workspace-body {
    grid-template-columns: 1fr;
  }

  .layers-sidebar {
    display: none;
  }

  .active-layer-chip {
    display: none;
  }

  .workspace-toolbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 8px;
  }

  .workspace-toolbar .btn {
    padding: 9px 10px;
  }

  .drawing-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .fiber-fields {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   FASE 1 · ACCESO Y PERSONALIZACIÓN
   ========================================================= */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 18%, rgba(33, 196, 221, 0.28), transparent 28%),
    radial-gradient(circle at 82% 84%, rgba(8, 120, 209, 0.25), transparent 30%),
    linear-gradient(135deg, #04111f, var(--navy-900) 48%, #0c3557);
}

.auth-network {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(32deg, transparent 47%, rgba(87, 220, 239, 0.75) 48% 49%, transparent 50%),
    radial-gradient(circle, #63e6f5 0 3px, transparent 4px);
  background-size: 210px 140px, 210px 140px;
  transform: scale(1.12) rotate(-4deg);
}

.login-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(480px, 0.95fr);
}

.login-story {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 72px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--navy-950);
  background: linear-gradient(145deg, #63e6f5, #22b5ef);
  font-size: 24px;
  font-weight: 900;
}

.login-brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.login-brand span {
  margin-top: 3px;
  color: #bdd2e7;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.login-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 11px;
  border: 1px solid rgba(99, 230, 245, 0.28);
  border-radius: 999px;
  color: #8feaf5;
  background: rgba(33, 196, 221, 0.08);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-story h1 {
  max-width: 650px;
  color: var(--white);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.login-story > div > p {
  max-width: 590px;
  margin: 22px 0 0;
  color: #bdd2e7;
  font-size: 17px;
  line-height: 1.65;
}

.login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.login-capabilities span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #d9e8f4;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
}

.login-card-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(2, 10, 20, 0.2);
  backdrop-filter: blur(10px);
}

.login-card {
  width: min(440px, 100%);
  padding: 38px;
  color: var(--gray-950);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 35px 100px rgba(1, 10, 22, 0.5);
}

.login-card-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 15px;
  color: var(--blue-700);
  background: var(--blue-100);
}

.login-card h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.login-message {
  margin: 10px 0 26px;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.6;
}

.login-card .field + .field {
  margin-top: 15px;
}

.password-control {
  position: relative;
}

.password-control .field-control {
  padding-right: 48px;
}

.password-control button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 38px;
  height: 38px;
  border: 0;
  color: var(--gray-500);
  background: transparent;
}

.login-error {
  min-height: 20px;
  padding-top: 9px;
  color: #b42318;
  font-size: 11px;
}

.login-submit {
  width: 100%;
  margin-top: 5px;
}

.demo-access {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 11px;
  border: 1px solid #b2ddff;
  border-radius: 10px;
  color: #175cd3;
  background: #eff8ff;
}

.demo-access strong,
.demo-access span {
  display: block;
}

.demo-access strong {
  font-size: 10px;
}

.demo-access span {
  margin-top: 3px;
  font-size: 9px;
}

.login-card footer {
  display: grid;
  gap: 4px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-400);
  font-size: 9px;
  text-align: center;
}

.settings-screen {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 32px 28px 60px;
}

.settings-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.settings-heading-actions {
  display: flex;
  gap: 10px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
}

.settings-content {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.settings-card {
  padding: 22px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.settings-card-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}

.settings-card-heading-spread {
  justify-content: space-between;
}

.settings-card-heading-spread > .settings-card-heading {
  margin-bottom: 0;
}

.settings-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--blue-700);
  background: var(--blue-100);
}

.settings-card-heading h2,
.settings-card-heading p {
  margin: 0;
}

.settings-card-heading h2 {
  color: var(--navy-900);
  font-size: 16px;
}

.settings-card-heading p {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 11px;
}

.logo-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed var(--gray-300);
  border-radius: 11px;
  background: var(--gray-50);
}

.logo-upload-row img {
  width: 58px;
  height: 58px;
  padding: 4px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--white);
}

.logo-upload-row > span {
  color: var(--gray-400);
  font-size: 9px;
}

.file-button {
  cursor: pointer;
}

.theme-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.theme-preset {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 11px;
  color: var(--gray-700);
  background: var(--gray-50);
}

.theme-preset span {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: linear-gradient(135deg, #071c33 50%, #21c4dd 50%);
}

.theme-preset.oceano span {
  background: linear-gradient(135deg, #063847 50%, #18b8a5 50%);
}

.theme-preset.nocturno span {
  background: linear-gradient(135deg, #07111f 50%, #2f81f7 50%);
}

.theme-preset strong {
  font-size: 11px;
}

.category-setting-labels,
.category-setting-row {
  display: grid;
  grid-template-columns: 50px minmax(160px, 1fr) 84px minmax(160px, 0.8fr);
  align-items: center;
  gap: 9px;
}

.category-setting-labels {
  padding: 0 5px 7px;
  color: var(--gray-400);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-settings-list {
  display: grid;
  gap: 8px;
}

.category-setting-row {
  padding: 9px;
  border: 1px solid var(--gray-200);
  border-radius: 11px;
  background: var(--gray-50);
}

.category-setting-preview {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--category-color) 30%, white);
  border-radius: 11px;
  color: var(--category-color);
  background: color-mix(in srgb, var(--category-color) 11%, white);
}

.icon-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 3px;
}

.icon-library-item {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--gray-600);
  background: var(--gray-50);
  text-align: center;
}

.icon-library-item .material-symbols-outlined {
  color: var(--blue-700);
  font-size: 26px;
}

.icon-library-item span:last-child {
  font-size: 9px;
  font-weight: 700;
}

.settings-count {
  padding: 6px 9px;
  border-radius: 999px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 9px;
  font-weight: 800;
}

.settings-preview-sticky {
  position: sticky;
  top: 96px;
}

.settings-preview {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.settings-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  color: var(--white);
  background: var(--navy-900);
}

.settings-preview-bar > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--cyan-500);
}

.settings-preview-bar strong,
.settings-preview-bar small {
  display: block;
}

.settings-preview-bar strong {
  font-size: 12px;
}

.settings-preview-bar small {
  margin-top: 3px;
  color: #bdd2e7;
  font-size: 8px;
}

.settings-preview-body {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.preview-project-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 11px;
  background: var(--gray-50);
}

.preview-project-card strong,
.preview-project-card small {
  display: block;
}

.preview-project-card strong {
  font-size: 10px;
}

.preview-project-card small {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 8px;
}

.settings-preview-body button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
}

.settings-backup-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.project-wizard-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 14px 22px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.wizard-step-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  color: var(--gray-400);
  background: transparent;
  text-align: left;
}

.wizard-step-button:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 22px;
  height: 2px;
  background: var(--gray-300);
}

.wizard-step-button b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--gray-500);
  background: var(--gray-200);
  font-size: 10px;
}

.wizard-step-button span {
  font-size: 9px;
  font-weight: 800;
}

.wizard-step-button.is-active {
  color: var(--blue-700);
}

.wizard-step-button.is-active b,
.wizard-step-button.is-complete b {
  color: var(--white);
  background: var(--blue-700);
}

.wizard-step-button.is-complete::after {
  background: var(--blue-700);
}

.project-wizard-content {
  min-height: 470px;
}

.wizard-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 22px;
}

.wizard-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 720px;
  margin-bottom: 24px;
}

.wizard-section-heading > .material-symbols-outlined {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: var(--blue-700);
  background: var(--blue-100);
  font-size: 25px;
}

.wizard-section-heading h3,
.wizard-section-heading p {
  margin: 0;
}

.wizard-section-heading h3 {
  color: var(--navy-900);
  font-size: 19px;
}

.wizard-section-heading p {
  margin-top: 5px;
  color: var(--gray-500);
  font-size: 11px;
}

.wizard-form-grid {
  max-width: 850px;
}

.input-suffix {
  position: relative;
}

.input-suffix .field-control {
  padding-right: 58px;
}

.input-suffix span {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 48px;
  height: 42px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--gray-200);
  color: var(--gray-500);
  background: var(--gray-50);
  font-size: 9px;
}

.wizard-live-calculation {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 15px;
  border: 1px solid #b2ddff;
  border-radius: 11px;
  color: #175cd3;
  background: #eff8ff;
}

.wizard-live-calculation strong,
.wizard-live-calculation small {
  display: block;
}

.wizard-live-calculation strong {
  font-size: 12px;
}

.wizard-live-calculation small {
  margin-top: 3px;
  font-size: 9px;
}

.calculated-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid #b2ddff;
  border-radius: 9px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 15px;
  font-weight: 850;
}

.wizard-warning {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 8px;
  max-width: 850px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid #fec84b;
  border-radius: 10px;
  color: #93370d;
  background: #fffaeb;
}

.wizard-warning p {
  margin: 0 0 7px;
  font-size: 10px;
  line-height: 1.5;
}

.wizard-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}

.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-result-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 11px;
  background: var(--gray-50);
}

.summary-result-card > .material-symbols-outlined {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--blue-700);
  background: var(--blue-100);
}

.summary-result-card strong,
.summary-result-card small {
  display: block;
}

.summary-result-card strong {
  color: var(--navy-900);
  font-size: 16px;
}

.summary-result-card small {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 9px;
}

.summary-warnings {
  padding: 15px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-50);
}

.summary-warnings h4 {
  margin: 0 0 12px;
  color: #93370d;
  font-size: 12px;
}

.summary-warning-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  border-radius: 8px;
  color: #93370d;
  background: #fffaeb;
}

.summary-warning-item p,
.summary-ok p {
  margin: 0;
  font-size: 9px;
  line-height: 1.5;
}

.summary-warning-item .material-symbols-outlined {
  font-size: 16px;
}

.summary-ok {
  color: #067647;
  text-align: center;
}

.summary-ok .material-symbols-outlined {
  display: block;
  margin-bottom: 9px;
  font-size: 34px;
}

.summary-ok strong {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
}

body[data-density="compact"] .settings-card,
body[data-density="compact"] .project-card-body {
  padding: 14px;
}

body[data-density="compact"] .field-control,
body[data-density="compact"] .btn {
  min-height: 38px;
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .project-card {
  border-color: rgba(255, 255, 255, 0.12);
}

.panel,
.summary-card,
.project-card,
.settings-card,
.settings-preview,
.layers-sidebar,
.workspace-toolbar,
.modal,
.field-control,
.search-input {
  background-color: var(--app-surface);
}

body[data-theme="dark"] {
  --gray-700: #d5deea;
  --gray-600: #bdc9d8;
  --gray-500: #93a4b8;
  --gray-400: #72849a;
  --gray-300: #3b4b60;
  --gray-200: #26364b;
  --gray-100: #18263a;
  --blue-100: #102f50;
}

body[data-theme="dark"] .field-control,
body[data-theme="dark"] .search-input {
  color: var(--gray-950);
}

@media (max-width: 1120px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-preview-column {
    order: -1;
  }

  .settings-preview-sticky {
    position: static;
  }

  .login-layout {
    grid-template-columns: 1fr 440px;
  }

  .wizard-two-columns,
  .wizard-summary-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: auto;
    padding: 28px 22px;
  }

  .login-story > div:nth-child(2),
  .login-capabilities {
    display: none;
  }

  .login-card-wrap {
    min-height: calc(100vh - 110px);
    padding: 20px;
  }

  .login-card {
    padding: 26px 22px;
  }

  .topbar-action {
    width: 38px;
    padding: 0;
    font-size: 0;
  }

  .topbar-action .material-symbols-outlined {
    font-size: 18px;
  }

  .user-profile-chip {
    display: none;
  }

  .settings-screen {
    padding: 22px 14px 40px;
  }

  .settings-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-heading-actions .btn {
    flex: 1;
  }

  .category-setting-labels {
    display: none;
  }

  .category-setting-row {
    grid-template-columns: 48px 1fr 72px;
  }

  .category-setting-row select {
    grid-column: 2 / -1;
  }

  .project-wizard-nav {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    padding: 10px;
  }

  .wizard-step-button::after {
    display: none;
  }

  .project-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Client access detail and temporary coordinate pin */
.client-marker-wrapper { display: grid; place-items: center; background: transparent; border: 0; }
.client-marker { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #fff; color: #fff; background: var(--client-color, #0878d1); box-shadow: 0 1px 3px rgba(7,28,51,.2); pointer-events: none; }
.client-marker .material-symbols-outlined { font-size: 11px; font-variation-settings: "FILL" 1, "wght" 500; }
.client-access-fields { padding: 14px; margin-bottom: 16px; border: 1px solid #cfe1ef; border-radius: 12px; background: #f5faff; }
.client-access-fields h3 { margin: 0 0 6px; font-size: 15px; color: #083c65; }
.client-access-fields p { margin: 6px 0 12px; font-size: 12px; line-height: 1.5; }
.client-access-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.coordinate-search-control { width: min(300px, calc(100vw - 100px)); padding: 10px; border: 1px solid #d7e4ee; border-radius: 12px; background: rgba(255,255,255,.97); box-shadow: 0 3px 12px rgba(7,28,51,.12); color: #16324b; }
.coordinate-search-control label { display: block; margin-bottom: 6px; font: 600 12px/1.4 sans-serif; }
.coordinate-search-row { display: flex; align-items: center; gap: 4px; }
.coordinate-search-row input { min-width: 0; width: 100%; height: 34px; padding: 7px; border: 1px solid #c8d9e5; border-radius: 7px; font-size: 12px; }
.coordinate-search-row button { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 7px; color: #0878d1; background: #eaf4fc; cursor: pointer; font-size: 20px; }
.coordinate-search-row .material-symbols-outlined { font-size: 20px; }
.coordinate-search-control small { display: block; margin-top: 6px; font-size: 10px; line-height: 1.4; }
.coordinate-pin-wrapper { border: 0; background: transparent; }
.coordinate-pin { font-size: 34px; color: #0878d1; filter: drop-shadow(0 1px 2px #fff); font-variation-settings: "FILL" 1, "wght" 500; }
.coordinate-pin-popup label { display: block; margin: 10px 0; font-size: 12px; }
.coordinate-pin-popup select { display: block; width: 100%; margin-top: 4px; }
.coordinate-pin-popup .btn { width: 100%; margin: 4px 0 8px; }
.coordinate-pin-popup small { display: block; font-size: 11px; line-height: 1.4; }
.coordinate-add-btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 600px) { .client-access-grid { grid-template-columns: 1fr; } }

/* Customer records and project-wide map search */
.client-data-grid { margin: 12px 0 18px; }
.client-connection-heading { padding-top: 14px; border-top: 1px solid #d9e7f2; }
.map-search-control { width: min(350px, calc(100vw - 100px)); }
.map-search-control label > span { float: right; color: #8295a5; font: 10px/1.5 sans-serif; }
.map-search-results { max-height: min(330px, 45vh); overflow-y: auto; margin-top: 7px; border: 1px solid #d6e3ed; border-radius: 9px; background: #fff; }
.map-search-result { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 8px; border: 0; border-bottom: 1px solid #edf2f7; color: #16324b; background: #fff; text-align: left; cursor: pointer; }
.map-search-result:hover,.map-search-result.is-active { background: #eaf4fc; }
.map-search-result > .material-symbols-outlined { flex-shrink: 0; font-size: 20px; color: #0878d1; }
.map-search-result > span:last-child { min-width: 0; }
.map-search-result strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; line-height: 1.4; }
.map-search-result small { margin-top: 3px; font-size: 10px; color: #687f92; }
.map-search-overview { width: 100%; padding: 10px; border: 0; background: #f4f9fd; color: #0878d1; cursor: pointer; font-size: 11px; font-weight: 600; }
.map-quick-tools { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; padding-top: 9px; margin-top: 9px; border-top: 1px solid #e0ebf3; }
.map-quick-tools button { display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 6px 2px; border: 0; border-radius: 7px; color: #30536f; background: #f4f8fb; cursor: pointer; }
.map-quick-tools button:hover,.map-quick-tools button.is-active { color: #0878d1; background: #e0f0fc; }
.map-quick-tools button > .material-symbols-outlined { font-size: 19px; }
.map-quick-tools button small { margin: 0; font-size: 9px; }
.map-search-popup { max-height: 360px; overflow-y: auto; font-size: 12px; line-height: 1.5; }
.map-search-popup > p { color: #687f92; font-size: 11px; }
.map-search-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.map-search-popup-actions .btn { padding: 7px 10px; font-size: 11px; }


/* Preview client KMZ import */
.client-import-toolbar-btn { display:inline-flex; align-items:center; gap:5px; }
.client-import-toolbar-btn .material-symbols-outlined { font-size:18px; }
.client-import-modal { width:min(940px,100%); }
.client-import-content { display:grid; gap:14px; }
.client-import-step { padding:15px; border:1px solid var(--gray-200); border-radius:13px; background:#fff; }
.client-import-step .section-heading { margin-bottom:11px; }
.client-import-type-card { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:11px; padding:12px; border:1px solid #b2ddff; border-radius:11px; background:#f5faff; }
.client-import-type-card > .material-symbols-outlined { display:grid; place-items:center; width:42px; height:42px; border-radius:11px; color:#0878d1; background:#e0f0fc; }
.client-import-type-card strong,.client-import-type-card small { display:block; }
.client-import-type-card small { margin-top:3px; color:var(--gray-500); font-size:10px; line-height:1.4; }
.client-import-pilot { padding:5px 8px; border-radius:13px; color:#067647; background:#d1fadf; font-size:9px; font-weight:800; }
.client-import-dropzone { display:grid; justify-items:center; gap:5px; padding:20px; border:2px dashed #84caff; border-radius:12px; color:#075985; background:#f5faff; cursor:pointer; text-align:center; }
.client-import-dropzone:hover { background:#eaf4fc; }
.client-import-dropzone .material-symbols-outlined { font-size:30px; }
.client-import-dropzone strong { font-size:13px; }
.client-import-dropzone small { color:var(--gray-500); font-size:10px; }
.client-import-status { margin-top:9px; padding:9px 11px; border-radius:8px; color:var(--gray-600); background:var(--gray-100); font-size:11px; }
.client-import-status.is-loading { color:#075985; background:#eaf4fc; }
.client-import-status.is-success { color:#067647; background:#ecfdf3; }
.client-import-status.is-error { color:#b42318; background:#fef3f2; }
.client-import-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.client-import-summary > div { display:grid; justify-items:center; gap:3px; padding:10px 6px; border-radius:9px; background:var(--gray-50); text-align:center; }
.client-import-summary .material-symbols-outlined { color:#0878d1; font-size:19px; }
.client-import-summary strong { color:var(--navy-900); font-size:17px; }
.client-import-summary small { color:var(--gray-500); font-size:9px; line-height:1.25; }
.client-import-table-wrap { max-height:260px; overflow:auto; border:1px solid var(--gray-200); border-radius:10px; }
.client-import-table { width:100%; border-collapse:collapse; font-size:10px; }
.client-import-table th { position:sticky; top:0; z-index:1; padding:9px; color:var(--gray-600); background:var(--gray-100); text-align:left; }
.client-import-table td { padding:9px; border-top:1px solid var(--gray-200); vertical-align:top; }
.client-import-table td strong,.client-import-table td small { display:block; }
.client-import-table td small { margin-top:2px; color:var(--gray-500); }
.client-import-privacy { display:flex; align-items:center; gap:7px; margin:10px 0 0; color:var(--gray-500); font-size:10px; }
.client-import-privacy .material-symbols-outlined { color:#12b76a; font-size:17px; }
.client-imported-data { margin:2px 0 16px; padding:11px 12px; border:1px solid #d6e3ed; border-radius:10px; background:#fff; }
.client-imported-data summary { color:#075985; cursor:pointer; font-size:12px; font-weight:800; }
.client-imported-data #clientImportedDataRows { display:grid; gap:7px; margin-top:10px; }
.client-imported-data #clientImportedDataRows > div { display:grid; grid-template-columns:minmax(110px,.35fr) minmax(0,1fr); gap:10px; padding-bottom:7px; border-bottom:1px solid #edf2f7; font-size:11px; }
.client-imported-data b { color:var(--gray-600); }
.client-imported-data span { overflow-wrap:anywhere; }
.client-imported-data > small { display:block; margin-top:8px; color:var(--gray-400); font-size:9px; }
@media (max-width:900px) {
  .client-import-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .client-import-table th:nth-child(3),.client-import-table td:nth-child(3) { display:none; }
}
@media (max-width:700px) {
  .client-import-toolbar-btn > span:last-child { display:none; }
  .client-import-toolbar-btn { padding-inline:10px; }
  .client-import-type-card { grid-template-columns:42px 1fr; }
  .client-import-pilot { grid-column:1/-1; justify-self:start; }
  .client-import-modal .modal-footer { align-items:stretch; flex-direction:column; }
  .client-import-modal .footer-actions { display:grid; grid-template-columns:1fr 1fr; }
  .client-imported-data #clientImportedDataRows > div { grid-template-columns:1fr; gap:3px; }
}

.client-import-project-warning { display:flex; align-items:center; gap:7px; margin:8px 0 0; padding:8px 10px; border-radius:8px; color:#7a2e0e; background:#fff7ed; font-size:10px; }
.client-import-project-warning .material-symbols-outlined { font-size:17px; }


/* =========================================================
   IMPORTACIÓN KMZ Y ORGANIZACIÓN CON EXCEL
   ========================================================= */
.client-import-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 22px 0;
  background: var(--white);
}
.client-import-tabs button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px 10px 0 0;
  font-size: 12px;
  font-weight: 750;
}
.client-import-tabs button.is-active {
  color: var(--blue-700);
  background: #eef7ff;
  border-color: #9cccf3;
  box-shadow: inset 0 -2px 0 var(--blue-600);
}
.client-workbook-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid #b9dcf8;
  border-radius: 12px;
  background: #f2f9ff;
}
.client-workbook-download strong,
.client-workbook-download small {
  display: block;
}
.client-workbook-download strong {
  color: var(--navy-900);
  font-size: 13px;
}
.client-workbook-download small {
  max-width: 560px;
  margin-top: 5px;
  color: var(--gray-500);
  font-size: 11px;
  line-height: 1.5;
}
.client-workbook-download .btn {
  flex: 0 0 auto;
}
.client-workbook-issues {
  max-height: 180px;
  overflow: auto;
  margin-top: 12px;
}
.client-workbook-issues p {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 6px 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--gray-700);
  background: var(--gray-50);
  font-size: 11px;
  line-height: 1.45;
}
.client-workbook-issues p.is-error {
  color: #b42318;
  background: #fff5f4;
}
.client-workbook-issues p.is-warning {
  color: #8a4b08;
  background: #fffaeb;
}
.client-workbook-issues p.is-success {
  color: #067647;
  background: #ecfdf3;
}
.client-workbook-issues .material-symbols-outlined {
  flex: 0 0 auto;
  margin-top: 1px;
}
@media (max-width: 720px) {
  .client-import-tabs {
    padding-inline: 14px;
  }
  .client-import-tabs button {
    flex: 1;
    justify-content: center;
  }
  .client-workbook-download {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Keeps the importer actions visible while large KMZ/Excel previews scroll. */
.client-import-modal {
  display: flex;
  flex-direction: column;
  height: min(900px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
}

.client-import-modal > .modal-header,
.client-import-modal > .client-import-tabs {
  flex: 0 0 auto;
}

#clientImportForm {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.client-import-modal .client-import-content {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.client-import-modal .modal-footer {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  box-shadow: 0 -8px 20px rgba(15, 45, 70, 0.08);
}

@media (max-width: 700px) {
  .modal-backdrop:has(.client-import-modal) {
    padding: 8px;
  }

  .client-import-modal {
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
}
