/* Settings screen (#/settings) — prefix set- */
/* keep wide content (tab bar, matrices) from widening the shell grid column */
.screen[data-screen='settings'] { contain: inline-size; min-width: 0; }
.set-tabs .tabs { flex-wrap: wrap; row-gap: 0; }
@media (max-width: 900px) { .set-tabs .tabs { flex-wrap: nowrap; } }
.set-savebar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.set-err { color: var(--danger); font-size: 12px; min-height: 16px; }
.set-block { display: block; font-weight: 400; }
.set-num { width: 86px; text-align: right; }
.set-tax-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
.set-ta { font-family: 'Noto Sans Tamil', var(--font); line-height: 1.6; }

/* zone editor */
.set-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.set-plan-wrap { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.set-plan { width: 100%; height: auto; max-height: 560px; display: block; touch-action: none; -webkit-user-select: none; user-select: none; }
.set-floor { fill: var(--surface); stroke: none; }
.set-wall { stroke: var(--slate-600); stroke-width: 0.1; fill: none; stroke-linecap: square; }
.set-glass { stroke: #38bdf8; stroke-width: 0.09; fill: none; stroke-dasharray: 0.25 0.08; }
.set-fx { stroke: var(--slate-400); stroke-width: 0.025; }
.set-fx.counter { fill: #c8b79a; }
.set-fx.rack { fill: #cbd5e1; }
.set-fx.gondola { fill: #e2e8f0; }
.set-fx.rx { fill: #fecaca; }
.set-fx.fridge { fill: #bae6fd; }
.set-fx.carton { fill: #e7d3b0; }
.set-pos { fill: var(--slate-700); }
.set-lbl { font-size: 0.26px; fill: var(--text-3); font-family: var(--font); }
.set-lbl.title { font-size: 0.3px; font-weight: 650; fill: var(--text-2); }
.set-zone { cursor: pointer; }
.set-zone polygon { transition: fill-opacity 120ms; }
.set-zone:hover polygon:first-child { fill-opacity: 0.24; }
.set-zone:focus { outline: none; }
.set-zone:focus-visible polygon:first-child { stroke-width: 0.08; }
.set-zone-lbl { font-size: 0.28px; font-weight: 700; font-family: var(--font); pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 0.06; }
.set-handle { fill: #fff; stroke: var(--brand); stroke-width: 0.05; cursor: grab; }
.set-handle.sel, .set-handle:focus { fill: var(--brand); outline: none; }
.set-handle:active { cursor: grabbing; }
.set-cam .set-fov { fill: #2563EB; fill-opacity: 0.08; stroke: #2563EB; stroke-opacity: 0.35; stroke-width: 0.02; pointer-events: none; }
.set-cam .set-cam-dot { fill: #1e3a8a; stroke: #fff; stroke-width: 0.04; }
.set-cam.off .set-cam-dot { fill: var(--danger); }
.set-cam.off .set-fov { fill: #DC2626; stroke: #DC2626; }
.set-cam-lbl { font-size: 0.22px; font-weight: 700; fill: #1e3a8a; font-family: var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 0.05; pointer-events: none; }
.set-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--text-2); padding: 8px 4px 0; }
.set-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.set-swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.set-swatch.hatch { background: repeating-linear-gradient(45deg, rgba(220, 38, 38, 0.55) 0 2px, transparent 2px 5px); border: 1px solid rgba(220, 38, 38, 0.4); }
.set-swatch.cam { background: #1e3a8a; border-radius: 50%; }
.set-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.set-zone-list { display: flex; flex-direction: column; gap: 2px; max-height: 250px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.set-zone-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: none; background: none; border-radius: 8px; text-align: left; cursor: pointer; color: var(--text); font-size: 12.5px; }
.set-zone-item:hover { background: var(--surface-2); }
.set-zone-item.active { background: var(--brand-50); color: var(--brand); font-weight: 650; }
.set-zone-panel { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.set-zone-panel .chip-row .check { font-size: 12px; }
.set-verts { display: flex; flex-wrap: wrap; gap: 4px; }
.set-verts .chip { height: 24px; font-size: 11px; font-variant-numeric: tabular-nums; }
.set-zone-status { font-size: 12px; }

/* roles */
.set-matrix td, .set-matrix th { white-space: nowrap; }
.set-matrix td.wrap { white-space: normal; min-width: 180px; color: var(--text-2); font-size: 12px; }
.set-yes { color: var(--success); display: inline-flex; }
.set-no { color: var(--slate-400); display: inline-flex; }
.set-rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 12.5px; }
.set-rules li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* privacy */
.set-ret { display: flex; flex-direction: column; gap: 10px; }
.set-ret-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(80px, 1fr) auto; gap: 12px; align-items: center; font-size: 13px; }
.set-print-notice { display: none; }
@media print {
  body.set-printing > *:not(.set-print-notice) { display: none !important; }
  body.set-printing .set-print-notice { display: block; padding: 40px; font-size: 20px; line-height: 1.6; color: #000; }
  .set-print-notice h1 { font-size: 34px; margin-bottom: 18px; }
}

/* notifications / display / data */
.set-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.set-toggle { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.set-toggle .check { align-items: flex-start; }
.set-display { gap: 0; }
.set-disp-row, .set-data-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.set-disp-row:last-child, .set-data-row:last-child { border-bottom: none; }
.set-data-row.danger b { color: var(--danger); }
.set-ledger:empty { display: none; }

@media (max-width: 1100px) {
  .set-editor, .set-tax-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .set-ret-row { grid-template-columns: 1fr; }
}

.set-tab .tbl td:first-child { white-space: nowrap; }
.set-data-row > div:first-child, .set-disp-row > div:first-child { flex: 1 1 240px; min-width: 0; }
