/* Header (fixed product bar) */
.logo-bar{
  position:fixed;
  inset:0 0 auto 0;
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 20px;
  background:var(--bg-header);
  border-bottom:var(--border-nrw);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  z-index:1000;
}
.logo-bar-inner{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:18px;
}
.logo-bar-leading{
  min-width:0;
  display:flex;
  align-items:center;
  gap:16px;
}
.logo-wrap{
  flex:0 0 auto;
  display:flex;
  align-items:center;
}
.logo-brand-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--text-light);
  text-decoration:none;
  line-height:1;
}
.logo-brand-link:hover{
  color:#fff;
}
.logo-brand-sun{
  width:32px;
  height:32px;
  display:block;
  object-fit:contain;
  filter:drop-shadow(0 0 14px rgba(241, 196, 58, 0.18));
}
.logo-brand-divider{
  width:1px;
  height:28px;
  background:linear-gradient(180deg, rgba(241, 196, 58, 0.18), rgba(255, 255, 255, 0.62), rgba(241, 196, 58, 0.18));
  opacity:0.86;
}
.logo-brand-copy{
  display:grid;
  gap:2px;
}
.logo-brand-name{
  color:#f8fafc;
  font-family:"Montserrat", "Aptos Display", "Arial Black", sans-serif;
  font-size:16px;
  font-weight:900;
  letter-spacing:-0.03em;
  line-height:0.98;
}
.logo-brand-meta{
  color:rgba(241, 196, 58, 0.82);
  font-size:9px;
  font-weight:800;
  letter-spacing:0.18em;
  line-height:1;
  text-transform:uppercase;
}
.logo-bar-divider{
  width:1px;
  height:28px;
  background:rgba(255, 255, 255, 0.1);
}
.logo-context{
  min-width:0;
  display:grid;
  gap:4px;
}
.logo-context.is-empty{
  display:none;
}
.logo-context-kicker{
  color:rgba(241, 196, 58, 0.88);
  font-size:10px;
  font-weight:700;
  letter-spacing:0.1em;
  line-height:1;
  text-transform:uppercase;
}
.logo-context-title{
  max-width:min(420px, 100%);
  color:var(--text-light);
  font-size:14px;
  font-weight:700;
  letter-spacing:-0.015em;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.logo-bar-trailing{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
.logo-user-menu{
  position:relative;
}
.logo-user{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  padding:0;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--text-light);
  cursor:pointer;
  transition:background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.logo-user:hover{
  background:rgba(255, 255, 255, 0.05);
}
.logo-user:focus-visible{
  outline:none;
  background:rgba(255, 255, 255, 0.06);
  box-shadow:0 0 0 2px rgba(241, 196, 58, 0.28);
}
.logo-user-menu.is-open .logo-user{
  background:rgba(255, 255, 255, 0.07);
}
.logo-user-avatar{
  width:30px;
  height:30px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, rgba(241, 196, 58, 0.34), rgba(241, 196, 58, 0.22));
  box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color:#fff8df;
  font-size:11px;
  font-weight:800;
  letter-spacing:0.04em;
  text-transform:uppercase;
  overflow:hidden;
}
.logo-user-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.logo-user-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:min(280px, calc(100vw - 24px));
  padding:10px;
  border:var(--border-nrw);
  border-radius:14px;
  background:rgba(13, 17, 20, 0.98);
  box-shadow:0 18px 40px rgba(0, 0, 0, 0.28);
}
.logo-user-popover.is-hidden{
  display:none;
}
.logo-user-popover-head{
  display:grid;
  gap:4px;
  padding:4px 4px 10px;
  border-bottom:1px solid rgba(255, 255, 255, 0.06);
  margin-bottom:6px;
}
.logo-user-popover-title{
  font-size:13px;
  font-weight:700;
  color:var(--text-light);
}
.logo-user-popover-subtitle{
  font-size:12px;
  color:var(--muted);
}
.logo-user-menu-item{
  width:100%;
  min-height:38px;
  padding:0 12px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--text-light);
  display:flex;
  align-items:center;
  font:inherit;
  font-size:13px;
  font-weight:600;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
  box-sizing:border-box;
  transition:background-color var(--transition-fast), color var(--transition-fast);
}
.logo-user-menu-item:hover{
  background:rgba(255, 255, 255, 0.05);
}
.logo-user-menu-form{
  margin:0;
}
.logo-user-menu-button{
  appearance:none;
}
.logo-login-link{
  min-height:34px;
  padding:0 12px 0 10px;
  border:1px solid var(--control-active-border);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  background:var(--control-active-bg);
  color:var(--control-active-text);
  font-size:11px;
  font-weight:800;
  letter-spacing:0.04em;
  line-height:1;
  text-decoration:none;
  text-transform:uppercase;
  box-shadow:var(--control-active-shadow);
  transition:background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.logo-login-link:hover{
  border-color:var(--control-active-border-hover);
  background:var(--control-active-bg-hover);
  color:var(--control-active-text-hover);
  box-shadow:var(--control-active-shadow-hover);
}
.logo-login-link:focus-visible{
  outline:none;
  box-shadow:0 0 0 2px var(--control-active-ring), var(--control-active-shadow-hover);
}
.logo-login-link:active{
  transform:translateY(1px);
}
.logo-login-icon{
  width:15px;
  height:15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.logo-login-icon svg{
  width:100%;
  height:100%;
  display:block;
}
.logo-login-label{
  display:inline-flex;
  align-items:center;
  line-height:1;
  transform:translateY(0.5px);
}

/* App layout below header */
.workspace-shell{
  --workspace-editbar-h: 48px;
  --app-rail-btn-size: 38px;
  --app-rail-pad-block: 7px;
  --app-mobile-rail-h: calc(var(--app-rail-btn-size) + var(--app-rail-pad-block) + var(--app-rail-pad-block));
  --app-mobile-panel-inset-top: calc(var(--header-h) + var(--app-mobile-rail-h));
  --app-panel-header-h: var(--workspace-editbar-h);
  --app-panel-header-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0) 88%),
    var(--bg-sidebar-topbar);
  --app-panel-header-border-color: var(--accent-yellow);
  --app-panel-header-pad-x: 16px;
  display:flex;
  flex-direction:column;
  height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
  min-height:0;
}

#app{
  display:flex;
  flex:1 1 auto;
  height: auto;
  box-sizing: border-box;
  min-width: 300px;
  min-height: 0;
  align-items: stretch;
}

@supports (height: 100dvh) {
  .workspace-shell {
    height: calc(100dvh - var(--header-h));
  }
}

/* Sidebar */
.sidebar{
  --sidebar-rail-w: clamp(3.5rem, 3.1rem + 0.6vw, 4.5rem);
  --sidebar-detail-w: clamp(18rem, 22vw, 26rem);
  --sidebar-current-detail-w: var(--sidebar-detail-w);
  --sidebar-total-w: calc(var(--sidebar-rail-w) + var(--sidebar-current-detail-w));
  --sidebar-bottom-pad: 10px;
  --sidebar-rail-btn-size: var(--app-rail-btn-size);
  --sidebar-rail-pad-block: var(--app-rail-pad-block);
  --sidebar-rail-pad-inline: 6px;
  --sidebar-rail-gap: 5px;
  --sidebar-section-gap: 10px;
  --sidebar-head-h: var(--app-panel-header-h);
  --sidebar-header-bg: var(--app-panel-header-bg);
  --sidebar-header-border-color: var(--app-panel-header-border-color);
  --sidebar-header-pad-x: var(--app-panel-header-pad-x);
  --sidebar-header-pad-y: 11px;
  --sidebar-header-gap: 12px;
  --sidebar-header-chevron-space: 22px;
  --sidebar-header-clear-size: 22px;
  --sidebar-header-clear-gap: 8px;
  --sidebar-header-clear-space: calc(var(--sidebar-header-clear-size) + var(--sidebar-header-clear-gap));
  flex: 0 0 var(--sidebar-total-w);
  width: var(--sidebar-total-w);
  min-width: var(--sidebar-rail-w);
  transition: width .25s ease;
  border-right: var(--border-nrw);
  display:flex;
  flex-direction:row;
  align-items:stretch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0) 220px),
    var(--bg-sidebar-detail);
  min-height: 0;
  overflow-y: hidden;
  overflow-x: hidden;
}
.sidebar.is-detail-collapsed{
  --sidebar-current-detail-w: 0px;
}
.sidebar.is-detail-collapsed .sidebar-detail{display:none}

.sidebar-rail{
  width: var(--sidebar-rail-w);
  min-width: var(--sidebar-rail-w);
  min-height: 0;
  display:grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--sidebar-rail-gap);
  padding: var(--sidebar-rail-pad-block) var(--sidebar-rail-pad-inline);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 120px),
    var(--bg-sidebar-rail);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  overflow:hidden;
}

.sidebar-rail-menu{
  display:flex;
  flex-direction:column;
  gap: var(--sidebar-rail-gap);
  padding-top:2px;
  min-height: 0;
  align-items:center;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:none;
}

.sidebar-rail-footer{
  display:flex;
  flex-direction:column;
  gap: var(--sidebar-rail-gap);
  align-items:center;
  margin-top:0;
  padding-top:6px;
  background: transparent;
}

.sidebar-rail-menu::-webkit-scrollbar {
  width: 0;
}

.sidebar-rail-btn{
  width: var(--sidebar-rail-btn-size);
  height: var(--sidebar-rail-btn-size);
  border:none;
  border-radius:10px;
  background:transparent;
  padding:0;
  text-align:center;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.sidebar-rail-btn:hover{
  color:var(--text-light);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-rail-btn.is-active{
  color:#fff7df;
  background: linear-gradient(180deg, rgba(241, 196, 58, 0.12), rgba(241, 196, 58, 0.06));
  box-shadow: inset 0 0 0 1px rgba(241, 196, 58, 0.14);
}

.sidebar-rail-btn--report {
  color: rgba(241, 196, 58, 0.78);
}

.sidebar-rail-btn--report:hover,
.sidebar-rail-btn--report:focus-visible {
  color: #fff7df;
  background: rgba(241, 196, 58, 0.08);
  outline: none;
}

.sidebar-icon,
.sidebar-rail-btn-icon{
  flex:0 0 auto;
  width:22px;
  height:22px;
  text-align:center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.sidebar-icon svg,
.sidebar-rail-btn-icon svg{
  width:100%;
  height:100%;
  display:block;
}

.sidebar-rail-btn-label{
  display:none;
}

.sidebar-detail{
  flex:1 1 auto;
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0) 220px),
    var(--bg-sidebar-detail);
}

.sidebar-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  min-height:var(--sidebar-head-h);
  box-sizing:border-box;
  background: var(--app-panel-header-bg);
  border-bottom: 1px solid var(--app-panel-header-border-color);
  padding: 0 var(--app-panel-header-pad-x);
}

.sidebar-topbar-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.sidebar-topbar-title{
  min-width:0;
  font-size:var(--ui-nav-size);
  font-weight:var(--ui-nav-weight);
  letter-spacing:var(--ui-nav-spacing);
  text-transform:uppercase;
  line-height:1.2;
  color:var(--text-light);
}

.sidebar-collapse-btn.btn{
  flex:0 0 auto;
  align-self:center;
  margin:0;
  padding:0;
  width:28px;
  min-width:28px;
  height:28px;
  min-height:28px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  letter-spacing: 0;
}

.sidebar-collapse-btn.btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

.sidebar-close-icon--dismiss {
  display: none;
}

.sidebar-panel{
  flex:1 1 auto;
  min-height:0;
}

.sidebar-panel--settings,
.sidebar-panel--help{
  padding:0;
  overflow:auto;
}

.sidebar-panel--edit-workspace{
  padding:0 0 16px;
}

.sidebar-panel-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px 16px var(--sidebar-bottom-pad);
}

.sidebar-panel--settings .sidebar-panel-stack,
.sidebar-panel--help .sidebar-panel-stack{
  gap:0;
  padding:0;
}

.sidebar-panel-stack--grouped > *{
  min-width:0;
}

.sidebar-info-card{
  margin:0;
  padding:12px 12px 13px;
  border:var(--border-dv);
  border-radius:12px;
  background:var(--surface-1);
}

.sidebar-panel--settings .sidebar-info-card,
.sidebar-panel--help .sidebar-info-card{
  padding:12px var(--sidebar-header-pad-x);
  border:0;
  border-radius:0;
  background:transparent;
}

.sidebar-info-card--muted{
  background:var(--surface-0);
}

.sidebar-info-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.sidebar-info-card-title{
  margin:0;
  font-size:11px;
  font-weight:700;
  letter-spacing:var(--ui-section-spacing);
  text-transform:uppercase;
  color:var(--accent-yellow);
}

.sidebar-info-card p{
  margin:0;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
}

.sidebar-setting-row{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
}

.sidebar-panel--settings .sidebar-setting-row{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--sidebar-item-border-soft);
}

.sidebar-setting-field{
  margin-top:12px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(7rem, 40%);
  align-items:center;
  gap:12px;
  cursor:pointer;
}

.sidebar-setting-copy{
  min-width:0;
  display:grid;
  gap:2px;
}

.sidebar-setting-name{
  color:var(--text-light);
  font-size:12px;
  font-weight:600;
  line-height:1.35;
}

.sidebar-setting-meta{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.sidebar-setting-field .num-stepper,
.sidebar-setting-input{
  width:100%;
  max-width:100%;
  justify-self:end;
}

.sidebar-setting-input{
  background: rgba(255, 255, 255, 0.06);
  border: var(--border-dv);
  border-radius: 6px;
  min-height: 28px;
  padding: 4px 8px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 12px;
  outline: none;
  color-scheme: dark;
  box-sizing: border-box;
}

.sidebar-setting-input:focus{
  border-color: var(--accent-yellow);
  box-shadow: 0 0 4px rgba(243, 198, 35, 0.35);
}

.sidebar-help-list{
  margin:0;
  display:flex;
  flex-direction:column;
}

.sidebar-panel--help .sidebar-disclosure-trigger{
  font-size:13px;
  font-weight:600;
  line-height:1.25;
}

.sidebar-help-item-body{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.sidebar-accordion-body.sidebar-help-item-body{
  display:block;
}

.sidebar-help-item-body strong{
  color:var(--text-light);
  font-weight:600;
}

.sidebar-help-item-body a{
  color:var(--accent-yellow);
}

.sidebar-accordion-summary-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-accordion-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sidebar-accordion-unit {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 500;
}

.sidebar-accordion-meta {
  color: var(--sidebar-item-meta);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  transition: color var(--transition-fast);
}

.sidebar-layers-body {
  --sidebar-inline-control-w: min(100%, 12rem);
  --sidebar-inline-gap: 8px;
  --sidebar-inline-control-h: 28px;
  --sidebar-inline-font-size: 12px;
  flex: 1 1 auto;
  min-height:0;
  overflow-y:auto;
}

.sidebar-layer-group {
  border-top: 1px solid var(--sidebar-item-border);
  background: transparent;
}

.sidebar-layer-group:last-of-type {
  border-bottom: 1px solid var(--sidebar-item-border);
}

.sidebar-layer-group-header {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  column-gap: var(--sidebar-header-gap);
  padding: 0 var(--sidebar-header-pad-x);
}

.sidebar-disclosure-trigger {
  --sidebar-disclosure-chevron-inset: var(--sidebar-header-pad-x);
  --sidebar-disclosure-icon-size: 22px;
  --sidebar-disclosure-chevron-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  min-width: 0;
  color: var(--muted);
  font-family: inherit;
  font-weight: var(--section-title-weight);
  font-size: var(--section-title-size);
  line-height: 1.2;
  letter-spacing: 0;
  background: transparent;
  border-radius: 0;
}

.sidebar-accordion-item > .sidebar-disclosure-trigger {
  padding:
    var(--sidebar-header-pad-y)
    calc(var(--sidebar-header-pad-x) + var(--sidebar-header-chevron-space))
    var(--sidebar-header-pad-y)
    var(--sidebar-header-pad-x);
}

.sidebar-accordion-item--clearable > .sidebar-disclosure-trigger {
  padding-right: calc(
    var(--sidebar-header-pad-x) +
    var(--sidebar-header-chevron-space) +
    var(--sidebar-header-clear-space)
  );
}

summary.sidebar-disclosure-trigger::-webkit-details-marker {
  display: none;
}

.sidebar-layer-group-toggle-btn.sidebar-disclosure-trigger {
  --sidebar-disclosure-chevron-inset: 0px;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding:
    var(--sidebar-header-pad-y)
    var(--sidebar-header-chevron-space)
    var(--sidebar-header-pad-y)
    0;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.sidebar-disclosure-trigger::after {
  content: "";
  position: absolute;
  right: var(--sidebar-disclosure-chevron-inset);
  top: 50%;
  width: var(--sidebar-disclosure-icon-size);
  height: var(--sidebar-disclosure-icon-size);
  background-color: currentColor;
  -webkit-mask: var(--sidebar-disclosure-chevron-icon) no-repeat center / contain;
  mask: var(--sidebar-disclosure-chevron-icon) no-repeat center / contain;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.18s ease, color 0.18s ease, opacity 0.18s ease;
  opacity: 0.9;
}

.sidebar-panel--filters .sidebar-layer-group-header{
  grid-template-columns: minmax(0, 1fr);
}

.sidebar-panel--filters .sidebar-layer-group-visibility{
  display:none;
}

.sidebar-layer-group.is-open .sidebar-layer-group-header {
  background: var(--sidebar-item-summary-open);
}

.sidebar-layer-group-header:has(.sidebar-layer-group-checkbox:not(:checked)) .sidebar-layer-group-toggle-btn {
  color: var(--muted);
  opacity: 0.78;
}

.sidebar-layer-group:has(.sidebar-layer-group-checkbox:not(:checked)) .sidebar-layer-group-body {
  opacity: 0.62;
}

.sidebar-layer-group:hover > .sidebar-layer-group-header .sidebar-layer-group-toggle-btn,
.sidebar-layer-group-header:hover .sidebar-layer-group-toggle-btn {
  color: var(--text-light);
}

.sidebar-layer-group:hover > .sidebar-layer-group-header .sidebar-accordion-meta,
.sidebar-layer-group-header:hover .sidebar-accordion-meta {
  color: var(--sidebar-item-meta-strong);
}

.sidebar-layer-group.is-open > .sidebar-layer-group-header .sidebar-layer-group-toggle-btn {
  color: var(--text-light);
}

.sidebar-layer-group.is-open > .sidebar-layer-group-header .sidebar-layer-group-toggle-btn::after,
.sidebar-accordion-item[open] > .sidebar-disclosure-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.sidebar-layer-group.is-open > .sidebar-layer-group-header .sidebar-accordion-meta {
  color: var(--sidebar-item-meta-strong);
}

.sidebar-layer-group-visibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-layer-group-visibility--spacer{
  width:14px;
  min-width:14px;
  height:14px;
  cursor:default;
}

:is(.ui-checkbox, .sidebar-layer-group-checkbox, .sidebar-layer-choice-input--checkbox) {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid rgba(243, 198, 35, 0.9);
  border-radius: 2px;
  background: color-mix(in srgb, var(--bg-sidebar) 86%, rgba(255, 255, 255, 0.08));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  box-sizing: border-box;
  position: relative;
  vertical-align: middle;
}

.sidebar-accordion-clear {
  position: absolute;
  right: calc(
    var(--sidebar-header-pad-x) +
    var(--sidebar-header-chevron-space) +
    var(--sidebar-header-clear-gap)
  );
  top: 50%;
  transform: translateY(-50%);
  width: var(--sidebar-header-clear-size);
  height: var(--sidebar-header-clear-size);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.sidebar-accordion-clear-icon {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-accordion-clear-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar-accordion-clear:hover,
.sidebar-accordion-clear:focus-visible {
  color: var(--accent-yellow);
  background: rgba(242, 197, 35, 0.08);
  outline: none;
}

.sidebar-layer-group-body {
  display: block;
  margin: 0;
  padding: 0 0 8px;
  background: var(--sidebar-item-summary-open);
  border-top: 1px solid var(--sidebar-item-border-soft);
}

.sidebar-layer-group-body[hidden] {
  display: none;
}

.sidebar-layer-group-body > .sidebar-filter-item:first-child,
.sidebar-layer-group-body > .sidebar-layer-setting-item:first-child {
  margin-top: 0;
}

.sidebar-accordion-item {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--sidebar-item-border);
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.sidebar-accordion-item:last-child {
  border-bottom: 1px solid var(--sidebar-item-border);
}

.sidebar-accordion-item[open] > .sidebar-disclosure-trigger {
  color: var(--text-light);
  background: var(--sidebar-item-summary-open);
}

.sidebar-accordion-item.is-active > .sidebar-disclosure-trigger {
  color: var(--accent-yellow);
}

.sidebar-accordion-item.is-active > .sidebar-disclosure-trigger .sidebar-accordion-unit,
.sidebar-accordion-item.is-active > .sidebar-disclosure-trigger .sidebar-accordion-meta {
  color: color-mix(in srgb, var(--accent-yellow) 78%, white 22%);
}

.sidebar-layer-setting-item {
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
}

.sidebar-layer-setting-item + .sidebar-layer-setting-item {
  border-top: 0;
}

.sidebar-layer-setting-item-titlebar {
  padding: 12px var(--sidebar-header-pad-x) 11px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  background: transparent;
}

.sidebar-layer-setting-item-body {
  padding: 10px 16px 12px;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.025);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-panel--layers .sidebar-layer-group-body {
  padding: 0 0 8px;
}

.sidebar-panel--layers .sidebar-layer-setting-item {
  background: transparent;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.sidebar-panel--layers .sidebar-layer-setting-item + .sidebar-layer-setting-item {
  border-top: 0;
}

.sidebar-panel--layers .sidebar-layer-setting-item-titlebar {
  padding: 8px var(--sidebar-header-pad-x) 4px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
}

.sidebar-panel--layers .sidebar-layer-setting-item-body {
  padding: 0 16px 10px;
  background: transparent;
  border-top: 0;
}

.sidebar-layer-setting-control {
  display: block;
}

.sidebar-layer-choice-list {
  display: grid;
  gap: 0;
}

.sidebar-filter-list {
  padding: 0;
}

.sidebar-filter-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-filter-clear-all.btn {
  min-height: 0;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-filter-clear-all.btn:hover {
  color: var(--accent-yellow);
  background: transparent;
}

.sidebar-filter-clear-all.btn:disabled {
  opacity: 0.34;
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
}

.sidebar-filter-scope {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.sidebar-control-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sidebar-control-label,
.sidebar-filter-scope-label {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-filter-scope-buttons {
  display: inline-flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  gap: 0;
}

.sidebar-filter-scope-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.sidebar-filter-scope-buttons.segmented-control{
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar-filter-scope-buttons.segmented-control .sidebar-filter-scope-btn{
  border-radius: 8px;
}

.sidebar-layer-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: #d9e3ec;
  font-size: 13px;
  cursor: pointer;
}

.sidebar-layer-choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sidebar-layer-choice-input--radio,
.sidebar-layer-choice-input--checkbox {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  margin: 0;
  display: inline-block;
  flex: 0 0 auto;
}

.sidebar-layer-choice-input--radio {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(242, 197, 35, 0.7);
  background: transparent;
  position: relative;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.sidebar-layer-choice-input--radio::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-yellow);
  transform: translate(-50%, -50%) scale(0);
  transition: transform var(--transition-fast);
}

.sidebar-layer-choice-label {
  min-width: 0;
}

.sidebar-layer-choice:hover .sidebar-layer-choice-label {
  color: var(--text-light);
}

.sidebar-layer-choice-input--radio:checked::after {
  transform: translate(-50%, -50%) scale(1);
}

.sidebar-layer-choice-input--radio:checked + .sidebar-layer-choice-label,
.sidebar-layer-choice-input--checkbox:checked + .sidebar-layer-choice-label {
  color: var(--text-light);
  font-weight: 600;
}

.sidebar-layer-choice-input--radio:focus-visible,
.sidebar-layer-choice-input--checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(243, 198, 35, 0.18);
}

.sidebar-layer-setting-toggle {
  --sidebar-source-toggle-h: 28px;
  --sidebar-source-toggle-radius: 8px;
  display: inline-flex;
  position: relative;
  isolation: isolate;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  height: var(--sidebar-source-toggle-h);
  max-width: 100%;
}

.sidebar-layer-setting-toggle .btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  height: 100%;
  padding: 0 10px;
  border: none;
  border-radius: 0;
  font-size: var(--sidebar-inline-font-size);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  flex: 1 1 50%;
  position: relative;
  z-index: 1;
  box-shadow: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  transform: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-layer-group:hover > .sidebar-layer-group-header,
.sidebar-layer-group-header:hover,
.sidebar-accordion-item > .sidebar-disclosure-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-accordion-item > .sidebar-disclosure-trigger:hover {
  color: var(--text-light);
}

.sidebar-accordion-item > .sidebar-disclosure-trigger:hover .sidebar-accordion-meta {
  color: var(--sidebar-item-meta-strong);
}

.sidebar-accordion-item.is-active > .sidebar-disclosure-trigger:hover {
  color: var(--accent-yellow);
}

.sidebar-accordion-item.is-active > .sidebar-disclosure-trigger:hover .sidebar-accordion-unit,
.sidebar-accordion-item.is-active > .sidebar-disclosure-trigger:hover .sidebar-accordion-meta {
  color: color-mix(in srgb, var(--accent-yellow) 78%, white 22%);
}

.sidebar-accordion-body {
  padding: 10px 16px 12px;
  display: grid;
  gap: 10px;
  background: var(--sidebar-item-body-bg);
  border-top: 1px solid var(--sidebar-item-border-soft);
}

:is(.ui-checkbox, .sidebar-layer-group-checkbox, .sidebar-layer-choice-input--checkbox)::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--accent-yellow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / 10px 10px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / 10px 10px no-repeat;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

:is(.ui-checkbox, .sidebar-layer-group-checkbox, .sidebar-layer-choice-input--checkbox):checked::after {
  opacity: 1;
  transform: scale(1);
}

:is(.ui-checkbox, .sidebar-layer-group-checkbox, .sidebar-layer-choice-input--checkbox):hover,
.sidebar-layer-choice-input--radio:hover {
  border-color: var(--accent-yellow);
}

:is(.ui-checkbox, .sidebar-layer-group-checkbox, .sidebar-layer-choice-input--checkbox):focus-visible,
.sidebar-layer-choice-input--radio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(243, 198, 35, 0.18);
}

.sidebar-layer-filter-range {
  display: grid;
  gap: 10px;
}

.sidebar-layer-filter-range-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.sidebar-layer-filter-range-separator {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}

.sidebar-control-input,
.sidebar-layer-filter-number {
  width: 100%;
  border: var(--border-dv);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
  padding: 4px 6px;
  font: inherit;
  font-size: var(--sidebar-inline-font-size, 12px);
  font-weight: 600;
  outline: none;
  color-scheme: dark;
  box-sizing: border-box;
}

select.sidebar-control-input {
  color-scheme: light;
}

select.sidebar-control-input option,
select.sidebar-control-input optgroup {
  background: #f6f0df;
  color: #241b00;
}

.sidebar-control-input:focus,
.sidebar-layer-filter-number:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 2px rgba(243, 198, 35, 0.12);
}

.sidebar-layer-slider-wrap,
.sidebar-layer-filter-slider-wrap {
  position: relative;
  height: 22px;
}

.sidebar-layer-slider-track,
.sidebar-layer-filter-slider-track {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 6px;
  height: 6px;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.sidebar-layer-slider-track::after,
.sidebar-layer-filter-slider-track::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
  transition: box-shadow var(--transition-fast);
}

.sidebar-layer-slider-fill,
.sidebar-layer-filter-slider-fill {
  position: absolute;
  left: 1px;
  top: 1px;
  height: 4px;
  width: 0;
  border-radius: 999px;
  background: var(--accent-yellow);
  pointer-events: none;
}

.sidebar-layer-opacity-control:hover .sidebar-layer-slider-track::after,
.sidebar-layer-filter-range:hover .sidebar-layer-filter-slider-track::after {
  box-shadow: inset 0 0 0 1px rgba(243, 198, 35, 0.28);
}

.sidebar-layer-slider,
.sidebar-layer-filter-slider {
  position: absolute;
  left: 0;
  top: 6px;
  width: 100%;
  margin: 0;
  appearance: none;
  background: none;
  pointer-events: none;
  z-index: 2;
}

.sidebar-layer-slider::-webkit-slider-runnable-track,
.sidebar-layer-filter-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: none;
}

.sidebar-layer-slider::-webkit-slider-thumb,
.sidebar-layer-filter-slider::-webkit-slider-thumb {
  appearance: none;
  pointer-events: auto;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-sidebar) 88%, rgba(255, 255, 255, 0.12));
  border: 2px solid var(--accent-yellow);
  margin-top: -4px;
  box-shadow: none;
}

.sidebar-layer-slider::-moz-range-track,
.sidebar-layer-filter-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: none;
}

.sidebar-layer-slider::-moz-range-thumb,
.sidebar-layer-filter-slider::-moz-range-thumb {
  pointer-events: auto;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-sidebar) 88%, rgba(255, 255, 255, 0.12));
  border: 2px solid var(--accent-yellow);
  box-shadow: none;
}


.selection-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.selection-quick-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.selection-quick-actions--dock {
  grid-template-columns: 1fr;
}

.selection-quick-actions--dock .btn-primary {
  grid-column: auto;
}

.selection-quick-actions--section {
  grid-template-columns: 1fr;
}

/* Content & map */
.content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-app);
}
.content.is-dashboard-view{
  background:
    linear-gradient(180deg, rgba(241, 196, 58, 0.035), transparent 200px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 340px),
    #0b0f13;
}

.map-workspace,
.dashboard-view{
  flex:1 1 auto;
  min-width:0;
  min-height:0;
}

.map-workspace{
  display:flex;
  flex-direction:column;
}

.dashboard-view{
  overflow:auto;
}

.content.is-dashboard-view .dashboard-view{
  background: transparent;
}

.content.is-dashboard-view .dashboard-page{
  padding: 24px 28px 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 160px),
    transparent;
}

.content.is-dashboard-view .dashboard-layout{
  gap: 0;
}

.content.is-dashboard-view .dashboard-layout:not(.dashboard-layout--single){
  border: var(--border-nrw);
  background: rgba(13, 17, 20, 0.76);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.content.is-dashboard-view .dashboard-layout:not(.dashboard-layout--single) .dashboard-sidebar{
  position: sticky;
  top: 24px;
  align-self: start;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 200px),
    rgba(255, 255, 255, 0.012);
  box-shadow: none;
}

.content.is-dashboard-view .dashboard-layout:not(.dashboard-layout--single) .dashboard-surface{
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.content.is-dashboard-view .dashboard-layout--single .dashboard-surface{
  border: var(--border-nrw);
  border-radius: 0;
  background: rgba(13, 17, 20, 0.76);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.content.is-dashboard-view .dashboard-sidebar-section{
  padding: 18px 20px;
}

.content.is-dashboard-view .dashboard-sidebar-section--intro{
  gap: 14px;
}

.content.is-dashboard-view .dashboard-sidebar-title{
  font-size: 28px;
  letter-spacing: -0.03em;
}

.content.is-dashboard-view .dashboard-sidebar-copy{
  max-width: 28ch;
  font-size: 13px;
  line-height: 1.55;
}

.content.is-dashboard-view .dashboard-sidebar-link{
  min-height: 48px;
  padding: 0 20px;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.content.is-dashboard-view .dashboard-sidebar-link:hover{
  background: rgba(255, 255, 255, 0.03);
}

.content.is-dashboard-view .dashboard-sidebar-link.is-active{
  background:
    linear-gradient(90deg, rgba(241, 196, 58, 0.12), transparent 72%);
  box-shadow: inset 2px 0 0 var(--accent-yellow);
}

.content.is-dashboard-view .dashboard-sidebar-link-count{
  min-width: 30px;
  min-height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.content.is-dashboard-view .dashboard-header{
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 78%);
}

.content.is-dashboard-view .dashboard-title{
  font-size: 34px;
  letter-spacing: -0.04em;
}

.content.is-dashboard-view .dashboard-lead{
  color: color-mix(in srgb, var(--muted) 92%, white 8%);
}

.content.is-dashboard-view .dashboard-header-actions{
  align-items: flex-start;
}

.content.is-dashboard-view .dashboard-table-wrap,
.content.is-dashboard-view .dashboard-editor-table-wrap{
  background: transparent;
}

.content.is-dashboard-view .dashboard-table thead th,
.content.is-dashboard-view .dashboard-editor-table thead th{
  padding-top: 14px;
  padding-bottom: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.content.is-dashboard-view .dashboard-table tbody td{
  padding: 18px 24px;
}

.content.is-dashboard-view .dashboard-editor-table tbody td{
  padding: 16px 20px;
}

.content.is-dashboard-view .dashboard-table tbody td,
.content.is-dashboard-view .dashboard-editor-table tbody td{
  border-top-color: rgba(255, 255, 255, 0.07);
}

.content.is-dashboard-view .dashboard-table-row:hover{
  background: rgba(255, 255, 255, 0.025);
}

.content.is-dashboard-view .dashboard-table-row.is-current{
  background: linear-gradient(90deg, rgba(241, 196, 58, 0.08), rgba(241, 196, 58, 0.02));
  box-shadow: inset 2px 0 0 var(--accent-yellow);
}

.content.is-dashboard-view .dashboard-project-meta,
.content.is-dashboard-view .dashboard-editor-copy,
.content.is-dashboard-view .dashboard-roadmap-card p,
.content.is-dashboard-view .dashboard-placeholder-card p,
.content.is-dashboard-view .dashboard-detail-lead{
  color: color-mix(in srgb, var(--muted) 90%, white 10%);
}

.content.is-dashboard-view .dashboard-status{
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.content.is-dashboard-view .dashboard-row-controls{
  gap: 6px;
}

.content.is-dashboard-view .dashboard-table-btn.btn,
.content.is-dashboard-view .dashboard-header-btn.btn{
  min-width: 0;
}

.content.is-dashboard-view .dashboard-project-menu-toggle.btn{
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 8px;
}

.content.is-dashboard-view .dashboard-project-menu-popover{
  border-radius: 12px;
  background: rgba(13, 17, 20, 0.98);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.content.is-dashboard-view .dashboard-detail-section{
  gap: 20px;
  padding: 24px;
  background: transparent;
}

.content.is-dashboard-view .dashboard-editor-selection{
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.content.is-dashboard-view .dashboard-detail-stats{
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.content.is-dashboard-view .dashboard-stat-card{
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 90%),
    rgba(255, 255, 255, 0.01);
}

.content.is-dashboard-view .dashboard-editor-card,
.content.is-dashboard-view .dashboard-roadmap-card,
.content.is-dashboard-view .dashboard-placeholder-card{
  border-radius: 0;
  background: rgba(255, 255, 255, 0.015);
  box-shadow: none;
}

.content.is-dashboard-view .dashboard-editor-card-head{
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.015);
}

.content.is-dashboard-view .dashboard-roadmap-card,
.content.is-dashboard-view .dashboard-placeholder-card{
  padding: 18px 20px;
  border-left: 2px solid rgba(241, 196, 58, 0.28);
}

.view-container {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 220px),
    #171411;
  transition: background-color 180ms ease;
}

.leaflet-container {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 220px),
    #171411;
  color-scheme: light;
}

#app.is-editing #map {
  background: transparent;
}

.leaflet-pvw-edit-scrim-pane-pane {
  pointer-events: none;
}

.pvw-edit-scrim-layer {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 248, 226, 0.07), transparent 42%),
    linear-gradient(135deg, rgba(255, 248, 226, 0.06), rgba(18, 15, 11, 0.1) 44%, rgba(18, 15, 11, 0.28)),
    rgba(18, 15, 11, 0.48);
}

#app.is-editing .pvw-edit-scrim-layer {
  opacity: 1;
}

#app.is-editing .leaflet-control-geocoder,
#app.is-editing .png-control,
#app.is-editing .ovl-legend,
#app.is-editing .ovl-legend-launcher {
  display: none !important;
}

/* Geocoder (expanded with clear + search actions) */
.leaflet-control-geocoder {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 340px;
  min-width: 340px;
  max-width: calc(100vw - 110px);
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  color-scheme: light;
}

.leaflet-control-geocoder .leaflet-control-geocoder-icon {
  float: none;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  line-height: 35px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  background-position: center center;
  background-size: 22px 22px;
}

.leaflet-control-geocoder .leaflet-control-geocoder-form {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.leaflet-control-geocoder .leaflet-control-geocoder-form input {
  width: 100% !important;
  height: 35px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: #fff;
  color: #111827;
  caret-color: #111827;
  font-size: 13px;
  line-height: normal;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color-scheme: light;
}

.leaflet-control-geocoder .leaflet-control-geocoder-form input::placeholder {
  color: #6b7280;
  opacity: 1;
}

.leaflet-control-geocoder .leaflet-control-geocoder-alternatives {
  margin: 0;
  padding: 4px 0;
  background: #fff;
  color: #111827;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

.leaflet-control-geocoder .leaflet-control-geocoder-alternatives li {
  border-top: 0;
}

.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a {
  color: #111827;
  text-decoration: none;
}

.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a:hover,
.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a:focus-visible {
  background: #f3f4f6;
  color: #111827;
}

/* Map edit action handles */
.leaflet-marker-icon.cell-btn {
  box-sizing: border-box;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(92, 68, 0, 0.28);
  border-radius: 999px;

  background: rgba(255, 248, 226, 0.97);
  color: #3d2e00;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 5px 14px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  user-select: none;

  touch-action: manipulation;
  position: absolute;
  padding: 0;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

/* Add/remove variants */
.leaflet-marker-icon.cell-btn--add {
  border-color: rgba(92, 68, 0, 0.28);
}

.leaflet-marker-icon.cell-btn--remove {
  border-color: rgba(132, 36, 26, 0.36);
  background: rgba(255, 244, 239, 0.98);
  color: #7a2118;
}

/* Plus/minus shapes */
.leaflet-marker-icon.cell-btn::before,
.leaflet-marker-icon.cell-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
}

/* Horizontal bar (for both + and -) */
.leaflet-marker-icon.cell-btn::before {
  width: 15px;
  height: 2.5px;
}

/* Vertical bar – only for the + button */
.leaflet-marker-icon.cell-btn--add::after {
  width: 2.5px;
  height: 15px;
}

/* Remove button: no vertical bar → minus sign only */
.leaflet-marker-icon.cell-btn--remove::after {
  content: none;
}

/* Hover/active feedback without moving center */
.leaflet-marker-icon.cell-btn:hover {
  border-color: rgba(241, 196, 58, 0.66);
  background: rgba(255, 251, 236, 1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 0 0 4px rgba(241, 196, 58, 0.2),
    0 7px 18px rgba(0, 0, 0, 0.36);
}

.leaflet-marker-icon.cell-btn--remove:hover {
  border-color: rgba(157, 49, 38, 0.62);
  background: rgba(255, 239, 233, 1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 0 0 4px rgba(157, 49, 38, 0.16),
    0 7px 18px rgba(0, 0, 0, 0.36);
}

.leaflet-marker-icon.cell-btn:active {
  background: rgba(255, 251, 236, 1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 0 0 3px rgba(241, 196, 58, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.34);
}

/* Leaflet tooltips: haal standaard rand/pijl weg */
.leaflet-tooltip.feature-tooltip {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.is-editing .leaflet-tooltip.feature-tooltip {
  display: none;
}

/* Jouw “PV Works” look */
.feature-tooltip {
  position:absolute;
  left: 10px;
  top: 10px;
  pointer-events:auto;
}

.feature-tooltip .card {
  background: rgba(15, 15, 15, 0.88);
  border: var(--border-dv);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  padding: 10px 12px;
  color: var(--text-light);
  font: 12px/1.35;
  min-width: 240px;

  /* “glass” feel (werkt in moderne browsers) */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.feature-tooltip .title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--accent-yellow);
  letter-spacing: 0.2px;
}

.feature-tooltip .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(243, 198, 35, 0.20);
}

.feature-tooltip .grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
}

.feature-tooltip .k {
  color: var(--muted);
}

.feature-tooltip .v {
  font-weight: 700;
  color: var(--text-light);
  text-align: right;
}

.feature-tooltip .hr {
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 8px 0;
}

.feature-tooltip input, .feature-tooltip select {
  background: rgba(255, 255, 255, 0.06); /* subtle dark glass */
  border: var(--border-dv);
  border-radius: 6px;
  padding: 4px 6px;
  color: var(--text-light);
  font-weight: 600;
  width: 100%;
  outline: none;
  color-scheme: dark;
}

.feature-tooltip select {
  color-scheme: light;
}

/* Number steppers */
.num-stepper {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-width: 0;
}

.num-stepper input[type="number"] {
  width: 100%;
  padding-right: 26px;
  -moz-appearance: textfield;
}

.num-stepper input[type="number"]::-webkit-outer-spin-button,
.num-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.num-stepper-buttons {
  position: absolute;
  right: 4px;
  top: 3px;
  bottom: 3px;
  display: flex;
  flex-direction: column;
  width: 18px;
  border-left: var(--border-dv);
}

.num-stepper-btn {
  flex: 1 1 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.num-stepper-btn::before {
  content: "";
  width: 4px;
  height: 4px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.num-stepper-btn--up::before {
  transform: rotate(-135deg);
}

.num-stepper-btn:hover::before {
  border-right-color: var(--accent-yellow);
  border-bottom-color: var(--accent-yellow);
}

.num-stepper-btn:active::before {
  filter: brightness(0.9);
}

.feature-tooltip input:focus {
  border-color: var(--accent-yellow);       /* yellow highlight */
  box-shadow: 0 0 4px rgba(243, 198, 35, 0.35);
}

.feature-tooltip select option {
  background: #f6f0df;
  color: #241b00;
  padding: 6px;
}

.feature-tooltip select option:hover {
  background: rgba(243, 198, 35, 0.25); /* yellow hover */
}

/* Buttons */
.btn {
  border-radius: 8px;
  min-height: 36px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: none;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--accent-yellow);
  color: var(--accent-yellow-ink);
  border-color: rgba(241, 196, 58, 0.4);
}

.btn-primary:hover {
  background: var(--accent-yellow-hover);
  color: var(--accent-yellow-ink-strong);
  border-color: rgba(244, 202, 78, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f6f6f6;
}

.btn-danger {
  background: rgba(110, 24, 24, 0.18);
  color: #ffd2d2;
  border-color: rgba(255, 96, 96, 0.28);
}

.btn-danger:hover {
  background: rgba(128, 26, 26, 0.24);
  border-color: rgba(255, 106, 106, 0.4);
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow: none;
}

.btn-toggle:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-light);
}

.btn-toggle.is-active {
  background: var(--control-active-bg);
  border-color: var(--control-active-border);
  color: var(--control-active-text);
  box-shadow: none;
}

.btn-toggle.is-active:hover {
  background: var(--control-active-bg-hover);
  color: var(--control-active-text-hover);
}

.btn-toggle-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented-control{
  display:inline-flex;
  flex-wrap:wrap;
  gap:4px;
  padding:3px;
  border-radius:10px;
  background:rgba(255,255,255,0.03);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.06);
}

.segmented-control .btn-toggle{
  min-height:28px;
  padding:5px 12px;
  border:1px solid transparent;
  background:transparent;
  box-shadow:none;
  color:var(--muted);
}

.segmented-control .btn-toggle:hover{
  background:rgba(255,255,255,0.05);
  border-color:rgba(255,255,255,0.1);
}

.segmented-control .btn-toggle.is-active,
.segmented-control input[type="radio"]:checked + .btn-toggle{
  background:var(--control-active-bg);
  border-color:var(--control-active-border);
  color:var(--control-active-text);
  box-shadow:none;
}

.segmented-control .btn-toggle.is-active:hover,
.segmented-control input[type="radio"]:checked + .btn-toggle:hover{
  background:var(--control-active-bg-hover);
  border-color:var(--control-active-border-hover);
  color:var(--control-active-text-hover);
}

.segmented-control input:disabled + .btn-toggle,
.segmented-control label[aria-disabled="true"]{
  opacity:0.42;
  pointer-events:none;
}

.segmented-control--modes{
  align-self:stretch;
  width:100%;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
  padding:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.segmented-control--modes input[type="radio"]{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  margin:-1px !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
  clip:rect(0 0 0 0) !important;
  clip-path:inset(50%) !important;
  white-space:nowrap !important;
  opacity:0 !important;
  pointer-events:none !important;
}

.segmented-control--modes .btn-toggle{
  width:100%;
  min-width:0;
  min-height:34px;
  padding:7px 10px;
  font-size:11px;
  line-height:1.15;
  text-align:center;
}

.segmented-control--modes .btn-toggle:nth-of-type(odd):last-of-type{
  grid-column:1 / span 2;
}

.segmented-control--views{
  justify-content:flex-end;
}

input[type="radio"]:checked + .btn-toggle {
  background: var(--control-active-bg);
  border-color: var(--control-active-border);
  color: var(--control-active-text);
  box-shadow: none;
}

.sidebar-layer-setting-toggle.btn-toggle-group {
  gap: 0;
  border-radius: var(--sidebar-source-toggle-radius);
  overflow: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
}

.sidebar-layer-setting-toggle.btn-toggle-group::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
}

.sidebar-layer-setting-toggle .btn-toggle:first-of-type {
  border-top-left-radius: var(--sidebar-source-toggle-radius);
  border-bottom-left-radius: var(--sidebar-source-toggle-radius);
}

.sidebar-layer-setting-toggle .btn-toggle:last-of-type {
  border-top-right-radius: var(--sidebar-source-toggle-radius);
  border-bottom-right-radius: var(--sidebar-source-toggle-radius);
}

.sidebar-layer-setting-toggle input:disabled + .btn-toggle,
.sidebar-layer-setting-toggle .btn-toggle.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.sidebar-layer-setting-toggle .btn-toggle + .btn-toggle {
  border-left: none;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar-layer-setting-toggle input[type="radio"]:checked + .btn-toggle {
  background: var(--control-active-bg);
  color: var(--control-active-text);
  position: relative;
  z-index: 2;
  box-shadow: var(--control-active-shadow);
}

.sidebar-layer-setting-toggle .btn-toggle:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-layer-setting-toggle input[type="radio"]:checked + .btn-toggle:hover {
  background: var(--control-active-bg-hover);
  color: var(--control-active-text-hover);
  box-shadow: var(--control-active-shadow-hover);
}

.sidebar-layer-select {
  min-width: 0;
  width: var(--sidebar-inline-control-w);
  max-width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: var(--border-dv);
  border-radius: 6px;
  min-height: var(--sidebar-inline-control-h);
  padding: 4px 8px;
  color: var(--text-light);
  font-weight: 600;
  font-size: var(--sidebar-inline-font-size);
  color-scheme: light;
  outline: none;
}

.sidebar-layer-select:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 4px rgba(243, 198, 35, 0.35);
}

.sidebar-layer-select option {
  background: #f6f0df;
  color: #241b00;
}

.sidebar-layer-setting-select {
  width: 100%;
}

.sidebar-layer-opacity-control {
  display: flex;
  align-items: center;
  gap: var(--sidebar-inline-gap);
  width: 100%;
  min-height: var(--sidebar-inline-control-h);
}

.sidebar-layer-opacity-control .sidebar-layer-slider-wrap {
  width: 100%;
  min-width: 0;
}

.sidebar-layer-opacity-slider {
  width: 100%;
  min-width: 0;
}

.sidebar-layer-opacity-value {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  font-size: var(--sidebar-inline-font-size);
  min-width: 0;
}

/* Utility classes */
.is-hidden {
  display: none !important;
}

/* Messages */
#toast {
  visibility: hidden;
  min-width: 200px;
  margin-left: -100px;
  background: #333;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  position: fixed;
  left: 50%;
  bottom: 40px;
  font-size: 16px;
  opacity: 0;
  transition: opacity .4s, bottom .4s;
}

/* Extra*/
.divider {
  background: rgba(255, 255, 255, 0.08);
  height: 1px;
  margin: 6px 0;
}

/* Small screens */
@media (max-width: 600px){
  :root{
    --header-h: 54px;
  }
  .logo-bar{
    padding:0 12px;
  }
  .logo-bar-inner{
    gap:8px;
  }
  .logo-bar-leading{
    gap:10px;
  }
  .logo-bar-divider,
  .logo-brand-meta{
    display:none;
  }
  .logo-context-kicker{
    display:none;
  }
  .logo-context-title{
    max-width:120px;
    font-size:12px;
  }
  .logo-brand-sun{
    width:26px;
    height:26px;
  }
  .logo-brand-divider{
    height:22px;
  }
  .logo-brand-name{
    font-size:14px;
  }
  .logo-user{
    width:34px;
    height:34px;
  }
  .logo-user-avatar{
    width:28px;
    height:28px;
    font-size:10px;
  }
  .logo-user-popover{
    top:calc(100% + 8px);
    width:min(240px, calc(100vw - 24px));
  }
  .logo-login-link{
    width:32px;
    min-height:30px;
    padding:0;
    gap:0;
    font-size:10px;
  }
  .logo-login-icon{
    width:14px;
    height:14px;
  }
  .logo-login-label{
    display:none;
  }
  #app {
    position: relative;
    flex-direction: column;
  }
  .sidebar {
    --sidebar-total-w: 100%;
    --sidebar-mobile-rail-h: var(--app-mobile-rail-h);
    --sidebar-bottom-pad: 8px;
    --sidebar-rail-pad-inline: 10px;
    --sidebar-header-pad-y: 10px;
    width: 100%;
    flex-basis: auto;
    border-right: none;
    border-bottom: var(--border-nrw);
    background: var(--bg-sidebar);
    box-shadow: none;
    flex-direction: column;
    overflow: visible;
  }
  .sidebar.is-detail-collapsed .sidebar-detail{display:none}
  .sidebar-rail{
    display:flex;
    width: 100%;
    min-width: 0;
    min-height: var(--sidebar-mobile-rail-h);
    max-height: var(--sidebar-mobile-rail-h);
    box-sizing: border-box;
    flex-direction: row;
    align-items: center;
    gap: var(--sidebar-rail-gap);
    padding: var(--sidebar-rail-pad-block) var(--sidebar-rail-pad-inline);
    border-right: none;
    border-bottom: 0;
  }
  .sidebar-rail-menu{
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: row;
    gap: var(--sidebar-rail-gap);
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-top:0;
    align-items:center;
  }
  .sidebar-rail-footer{
    flex:0 0 auto;
    flex-direction: row;
    gap: var(--sidebar-rail-gap);
    margin-top:0;
    padding-top:0;
    background:none;
  }
  .sidebar-rail-btn{
    flex: 0 0 auto;
    justify-content: center;
  }

  .sidebar-detail{
    position: fixed;
    inset: var(--app-mobile-panel-inset-top) 0 0;
    z-index: 820;
    overflow: hidden;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0) 220px),
      var(--bg-sidebar-detail),
      #1a1714;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  }
  .sidebar-topbar{
    display:flex;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .sidebar-collapse-btn.btn{
    width:32px;
    min-width:32px;
    height:32px;
    min-height:32px;
    padding:0;
    border-radius:10px;
    font-size:11px;
  }
  .sidebar-collapse-btn .sidebar-close-icon--collapse {
    display: none;
  }
  .sidebar-collapse-btn .sidebar-close-icon--dismiss {
    display: inline-flex;
  }
  .sidebar-detail > .sidebar-panel.active{
    flex:1 1 auto;
    min-height:0;
  }
  .sidebar-layers-body{
    --sidebar-inline-control-h: 26px;
    --sidebar-inline-font-size: 11px;
  }
  .sidebar-layer-setting-item-titlebar{font-size:12px}
  .sidebar-panel--layers .sidebar-layer-setting-item-titlebar{padding-bottom:8px}
  .sidebar-panel{max-height:none}
  .sidebar-panel.active{border-left:none}
  .sidebar-setting-field{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .sidebar-setting-field .num-stepper,
  .sidebar-setting-input{
    width: 100%;
    justify-self: stretch;
  }

  .leaflet-bottom {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
  }
}

