/* Local SVG masks: one rounded, 1.75px outline family, no icon font or CDN.
   Existing icon spans, accessible button names and click handlers are retained. */
#appView {
  --ui-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --ui-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
  --ui-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20v-1a7 7 0 0 1 14 0v1'/%3E%3C/svg%3E");
  --ui-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='10' width='15' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3M12 14v3'/%3E%3C/svg%3E");
  --ui-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5M9 12h12m-4-4 4 4-4 4'/%3E%3C/svg%3E");
  --ui-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --ui-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5m6-6-6 6 6 6'/%3E%3C/svg%3E");
  --ui-next: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E");
  --ui-save: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h12l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z'/%3E%3Cpath d='M7 3v6h10V3M7 21v-8h10v8'/%3E%3C/svg%3E");
  --ui-folder: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v1M3 9h17a1 1 0 0 1 1 1.2l-1.8 8.2A2 2 0 0 1 17.2 20H5a2 2 0 0 1-2-2V9Z'/%3E%3C/svg%3E");
  --ui-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M9 6V3h6v3M5 6l1 14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1l1-14M10 10v7m4-7v7'/%3E%3C/svg%3E");
  --ui-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5c-3-2-6-2-10-1v15c4-1 7-1 10 1 3-2 6-2 10-1V4c-4-1-7-1-10 1Zm0 0v15'/%3E%3C/svg%3E");
  --ui-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Zm0 0v6h6M8 13h8m-8 4h5'/%3E%3C/svg%3E");
  --ui-file-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Zm0 0v6h6M12 12v6m-3-3h6'/%3E%3C/svg%3E");
  --ui-layers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 10 5-10 5L2 8l10-5Zm-10 9 10 5 10-5M2 16l10 5 10-5'/%3E%3C/svg%3E");
  --ui-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18M5 6h14M5 18h14'/%3E%3C/svg%3E");
  --ui-building: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v16M17 9h3v12M2 21h20M9 21v-4h3v4M8 7h1m3 0h1M8 11h1m3 0h1'/%3E%3C/svg%3E");
  --ui-route: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='5' r='2'/%3E%3Ccircle cx='19' cy='19' r='2'/%3E%3Cpath d='M7 5h9a4 4 0 0 1 0 8H8a3 3 0 0 0 0 6h9'/%3E%3C/svg%3E");
  --ui-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 8 3v6c0 4-4 7-8 9-4-2-8-5-8-9V6l8-3Z'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
  --ui-coins: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15 8.5H10a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H9M12 6v12'/%3E%3C/svg%3E");
  --ui-checklist: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='17' rx='2'/%3E%3Crect x='9' y='2' width='6' height='4' rx='1'/%3E%3Cpath d='m8 12 2 2 5-5M8 18h8'/%3E%3C/svg%3E");
  --ui-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10.3 4.5-8 14A1.7 1.7 0 0 0 3.8 21h16.4a1.7 1.7 0 0 0 1.5-2.5l-8-14a2 2 0 0 0-3.4 0ZM12 9v4m0 4h.01'/%3E%3C/svg%3E");
  --ui-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m13 2-9 12h7l-1 8 10-13h-7l1-7Z'/%3E%3C/svg%3E");
  --ui-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
}

#appView .add-icon { --ui-icon: var(--ui-plus); }
#appView .remove-icon { --ui-icon: var(--ui-minus); }
#appView .user-icon { --ui-icon: var(--ui-user); }
#appView .lock-icon { --ui-icon: var(--ui-lock); }
#appView .logout-icon { --ui-icon: var(--ui-logout); }
#appView .view-icon { --ui-icon: var(--ui-eye); }
#appView .back-icon { --ui-icon: var(--ui-back); }
#appView .next-icon { --ui-icon: var(--ui-next); }
#appView .save-icon { --ui-icon: var(--ui-save); }
#appView .open-icon { --ui-icon: var(--ui-folder); }
#appView .delete-icon { --ui-icon: var(--ui-trash); }
#appView .guide-icon { --ui-icon: var(--ui-book); }
#appView :is(.create-icon, .add-document-icon) { --ui-icon: var(--ui-file-plus); }
#appView :is(.projects-icon, .saved-page-icon) { --ui-icon: var(--ui-folder); --icon-ink: #087c61; }
#appView :is(.details-page-icon, .general-page-icon, .case-mini-icon) { --ui-icon: var(--ui-file); }
#appView :is(.environment-page-icon) { --ui-icon: var(--ui-globe); --icon-ink: #087c61; }
#appView :is(.structures-page-icon, .structure-tool-icon, .structure-profile-icon) { --ui-icon: var(--ui-building); }
#appView :is(.zones-page-icon, .zone-tool-icon, .zone-profile-icon) { --ui-icon: var(--ui-layers); }
#appView :is(.lines-page-icon, .service-mini-icon, .line-tool-icon, .line-profile-icon) { --ui-icon: var(--ui-route); --icon-ink: #087c61; }
#appView :is(.protection-page-icon, .protection-mini-icon) { --ui-icon: var(--ui-shield); --icon-ink: #087c61; }
#appView :is(.financial-page-icon, .financial-mini-icon) { --ui-icon: var(--ui-coins); --icon-ink: #a3650c; }
#appView :is(.standard-mini-icon, .standard-badge-icon) { --ui-icon: var(--ui-checklist); }
#appView .risk-mini-icon { --ui-icon: var(--ui-alert); --icon-ink: #a3650c; }
#appView .lightning-mini-icon { --ui-icon: var(--ui-bolt); }
#appView .status-symbol { --ui-icon: var(--ui-check); --icon-ink: #087c61; }
#appView .is-acceptable .protection-status-symbol { --ui-icon: var(--ui-check); --icon-ink: #087c61; }
#appView .is-excessive .protection-status-symbol { --ui-icon: var(--ui-alert); --icon-ink: #c12f24; }
#appView :is(button[id$="ReportButton"], button[data-report-project-id]) .save-icon { --ui-icon: var(--ui-file); }
#appView button[data-duplicate-project-id] .add-icon { --ui-icon: var(--ui-layers); }

#appView :is(.button-icon, .action-icon, .page-title-icon, .mini-icon, .badge-icon, .tool-icon, .structure-profile-icon, .zone-profile-icon, .line-profile-icon, .status-symbol, .protection-status-symbol) {
  position: relative;
  flex-shrink: 0;
  border: 0;
  color: inherit;
  pointer-events: none;
}

#appView :is(.button-icon, .tool-icon, .structure-profile-icon, .zone-profile-icon, .line-profile-icon) {
  background: none;
  box-shadow: none;
}

#appView :is(.action-icon, .page-title-icon, .mini-icon, .badge-icon) {
  --icon-ink: #2864cc;
  --icon-size: 58%;
  border-radius: 12px;
  background: #edf3ff;
  box-shadow: inset 0 0 0 1px rgba(40, 100, 204, 0.09);
}

#appView :is(.projects-icon, .saved-page-icon, .environment-page-icon, .lines-page-icon, .service-mini-icon, .protection-page-icon, .protection-mini-icon, .financial-mini-icon) {
  --icon-ink: #087c61;
  background: #eaf7f1;
  box-shadow: inset 0 0 0 1px rgba(8, 124, 97, 0.09);
}

#appView :is(.financial-page-icon, .risk-mini-icon) {
  --icon-ink: #a3650c;
  background: #fff5e5;
  box-shadow: inset 0 0 0 1px rgba(163, 101, 12, 0.1);
}

#appView :is(.status-symbol, .protection-status-symbol) {
  --icon-size: 82%;
  border-radius: 50%;
  background: #eaf7f1;
  box-shadow: none;
}

#appView .is-excessive .protection-status-symbol { background: #fff0ee; }
#appView .button-icon { --icon-size: 100%; }
#appView .tool-icon { --icon-ink: #64748b; --icon-size: 82%; }
#appView :is(.structure-profile-icon, .zone-profile-icon, .line-profile-icon) { --icon-ink: #64748b; --icon-size: 100%; }

/* Replace the old geometric pseudo-elements without changing their layout. */
#appView :is(.button-icon, .action-icon, .page-title-icon, .mini-icon, .badge-icon, .tool-icon, .structure-profile-icon, .zone-profile-icon, .line-profile-icon, .status-symbol, .protection-status-symbol)::before {
  content: "";
  position: absolute;
  display: block;
  inset: 0;
  margin: auto;
  width: var(--icon-size, 100%);
  height: var(--icon-size, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  clip-path: none;
  background: var(--icon-ink, currentColor);
  -webkit-mask: var(--ui-icon) center / contain no-repeat;
  mask: var(--ui-icon) center / contain no-repeat;
}

#appView :is(.button-icon, .action-icon, .page-title-icon, .mini-icon, .badge-icon, .tool-icon, .structure-profile-icon, .zone-profile-icon, .line-profile-icon, .status-symbol, .protection-status-symbol)::after {
  content: none;
  display: none;
}
