.app-shell.packets-on #nav-workspace { display: inline-flex; }

#workspace-home {
  display: block;
  min-height: 100%;
}
#workspace-home[hidden] { display: none; }

.workspace-product { max-width: 1180px; }

.ws-tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.ws-tabs button {
  background: none;
  border: none;
  color: var(--dim);
  font: 600 12.5px inherit;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.ws-tabs button.on { color: var(--txt); border-bottom-color: var(--acc); }
.ws-tabs[hidden] { display: none; }

.ws-note {
  font-size: 12.5px;
  color: var(--dim);
  margin: 0 0 14px;
  max-width: 720px;
}

.section { margin-bottom: 26px; }
.section h3 {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section h3 button {
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--acc);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 11.5px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.section h3 button:hover { background: var(--panel2); }

.rowlist {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.empty { padding: 16px; color: var(--dim); font-size: 12.5px; text-align: center; }
.th-sub { color: var(--dim); font-size: 12px; margin-top: 8px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-card .sv { font-size: 20px; font-weight: 700; }
.stat-card .sl {
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 4px;
}
.bucket-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bucket-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.bucket-pill.high { background: var(--red-soft, #fbe9e7); color: var(--red); }
.bucket-pill.medium { background: var(--amber-soft); color: var(--amber); }
.bucket-pill.low { background: var(--green-soft); color: var(--green); }
.bucket-pill.unclassified { background: var(--panel2); color: var(--dim); }

.placeholder-banner {
  background: var(--acc-soft);
  border: 1px solid var(--line2);
  border-left: 3px solid var(--acc);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--txt);
}

.map-section { margin-bottom: 24px; }
.map-toggle { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.map-toggle button {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--dim);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 600;
}
.map-toggle button.on { background: var(--acc); color: #fff; border-color: var(--acc); }
.coverage-map {
  position: relative;
  height: 340px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.coverage-map .leaflet-container { background: var(--panel2); font: inherit; }
.map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 900;
  background: #ffffffe8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--txt);
  box-shadow: 0 4px 18px rgba(25, 28, 24, .12);
}
.map-legend span { display: flex; align-items: center; gap: 6px; }
.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.summary-actions { margin-bottom: 20px; }
.summary-actions button {
  background: var(--acc);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 12.5px;
  cursor: pointer;
}

.siterow { border-bottom: 1px solid var(--line); padding: 12px 14px; }
.siterow:last-child { border-bottom: none; }
.siterow .st { display: flex; align-items: center; gap: 10px; }
.siterow .st .site-open {
  background: none;
  border: none;
  padding: 0;
  color: var(--acc);
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
.siterow .st .site-open:hover { text-decoration: underline; }
.siterow .st .meta { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.metricsform {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.metricsform label {
  font-size: 9.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dim);
  display: block;
  margin-bottom: 2px;
}
.metricsform input,
.metricsform select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 7px;
  color: var(--txt);
  font-size: 11.5px;
}
.metricsform button {
  grid-column: 1 / -1;
  background: none;
  border: 1px solid var(--line);
  color: var(--acc);
  border-radius: 6px;
  padding: 5px 0;
  font-size: 11px;
  cursor: pointer;
  margin-top: 2px;
}
.metrics-readonly { margin-top: 8px; font-size: 12px; color: var(--dim); }

.agreement-field { margin-bottom: 10px; }
.agreement-field label {
  display: block;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 3px;
}
.agreement-field input,
.agreement-field textarea {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--txt);
  font-size: 12.5px;
  font-family: inherit;
}
.agreement-field .plain { font-size: 12.5px; color: var(--txt); padding: 4px 0; }
#btn-saveagreement {
  background: var(--acc);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 12.5px;
  cursor: pointer;
}
#ag-err { margin-top: 8px; font-size: 11px; color: var(--dim); }

.healthcard { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.healthcard .hc {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.healthcard .hc .l {
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 5px;
}
.healthcard .hc .v { font-size: 13px; font-weight: 600; color: var(--dim); }

#workspace-home a { color: var(--acc); }

@media (max-width: 760px) {
  .metricsform { grid-template-columns: 1fr; }
  .healthcard { grid-template-columns: 1fr; }
}

@media print {
  body.print-summary > *:not(#app-shell),
  body.print-buyer > *:not(#app-shell) { display: none !important; }
  body.print-summary #app-shell > *:not(.workspace),
  body.print-buyer #app-shell > *:not(.workspace) { display: none !important; }
  body.print-summary .workspace > *:not(#workspace-home),
  body.print-buyer .workspace > *:not(#workspace-home) { display: none !important; }
  body.print-summary #workspace-tabs,
  body.print-buyer #workspace-tabs,
  body.print-summary #workspace-account,
  body.print-buyer #workspace-account,
  body.print-summary .summary-actions,
  body.print-buyer .summary-actions,
  body.print-summary .map-section,
  body.print-buyer .map-section { display: none !important; }
  body.print-summary,
  body.print-buyer { background: #fff !important; overflow: visible !important; height: auto !important; }
  body.print-summary *,
  body.print-buyer * { color: #000 !important; background: transparent !important; border-color: #ccc !important; }
}
