/* ===================================================================
 * Tool panel — canonical look for ALL tool dialogs.
 * Floating, non-modal, top-right. Modeled on the original Extrude panel.
 *
 * Use:  <div className="tool-panel"> ... </div>
 *
 * Per-tool color variants for .tp-header-icon (e.g. .tp-header-icon.cut)
 * live in the tool's own CSS file, not here.
 * =================================================================== */

.tool-panel {
  position: absolute;
  right: 12px;
  top: 80px;
  z-index: 150;
  width: 272px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

/* ── Header ── */
.tp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--border-light);
  user-select: none;
}

.tp-header-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  background: #6b7280; /* default — tools override with a brand color */
}

.tp-header-title {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  flex: 1;
}

.tp-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.tp-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── Body ── */
.tp-body {
  padding: 6px 0;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.tp-section {
  padding: 2px 12px;
}

.tp-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 0 4px;
}

/* ── Row layout ── */
.tp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  min-height: 30px;
  gap: 8px;
}

.tp-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 60px;
}

/* ── Select ── */
.tp-select {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  padding-right: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.12s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.tp-select:hover {
  border-color: var(--border);
}

.tp-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.tp-select[multiple] {
  padding: 4px;
  padding-right: 4px;
  background-image: none;
}

.tp-select[multiple] option {
  padding: 3px 6px;
  border-radius: 3px;
}

.tp-select[multiple] option:checked {
  background: var(--accent);
  color: #fff;
}

.tp-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Number input with unit ── */
.tp-input-group {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.12s ease;
  flex: 1;
  min-width: 0;
}

.tp-input-group:hover {
  border-color: var(--border);
}

.tp-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.tp-input-group input {
  width: 100%;
  min-width: 0;
  background: transparent;
  color: var(--text-primary);
  border: none;
  padding: 5px 8px;
  font-size: 11px;
  text-align: right;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.tp-input-group input:disabled {
  opacity: 0.4;
}

.tp-unit {
  color: var(--text-muted);
  font-size: 10px;
  padding: 0 8px 0 2px;
  white-space: nowrap;
  user-select: none;
}

/* ── Toggle switch ── */
.tp-toggle {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

.tp-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tp-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.tp-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.15s ease;
}

.tp-toggle input:checked + .tp-toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

.tp-toggle input:checked + .tp-toggle-track::after {
  left: 16px;
  background: #fff;
}

/* ── Segmented icon button row (for type/style pickers) ── */
.tp-seg-icons {
  display: inline-flex;
  gap: 4px;
}

.tp-seg-icons__btn {
  width: 26px;
  height: 26px;
  padding: 2px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.tp-seg-icons__btn:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.tp-seg-icons__btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tp-seg-icons__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Collapsible section header ── */
.tp-collapse {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px 0 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: left;
}

.tp-collapse:hover { color: var(--text-secondary); }

.tp-collapse__chevron {
  transition: transform 0.12s ease;
  flex-shrink: 0;
}

.tp-collapse__chevron.open {
  transform: rotate(90deg);
}

/* ── Distance / extents dropdown + flip arrow ── */
.tp-units-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.tp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.tp-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── Selection chip (e.g. picked face/edge) ── */
.tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
  font-size: 11px;
}

.tp-chip__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  cursor: pointer;
}

.tp-chip__clear:hover {
  background: rgba(255, 255, 255, 0.18);
}

.tp-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.tp-pick-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.tp-pick-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Divider ── */
.tp-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 12px;
}

/* ── Actions footer ── */
.tp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border-light);
}

.tp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  border: 1px solid transparent;
}

.tp-btn-cancel {
  background: var(--bg-elevated);
  border-color: var(--border-light);
  color: var(--text-secondary);
}

.tp-btn-cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.tp-btn-ok {
  background: var(--accent);
  color: #fff;
}

.tp-btn-ok:hover {
  background: var(--accent-hover);
}

.tp-btn-ok:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
/* ===== Bill of Materials Dialog ===== */

.bom-dialog {
  min-width: 600px;
  max-width: 800px;
}

.bom-body {
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}

.bom-empty {
  padding: 16px;
  margin: 0;
  color: var(--text-secondary, #aaa);
}

.bom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bom-thead-row {
  background: var(--bg-secondary, #2a2a2a);
  position: sticky;
  top: 0;
}

.bom-th {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, #444);
  white-space: nowrap;
}

.bom-tr--odd {
  background: var(--bg-tertiary, #1e1e1e);
}

.bom-td {
  padding: 6px 12px;
}

.bom-td--center {
  text-align: center;
}

.bom-td--right {
  text-align: right;
}

.bom-td--muted {
  color: var(--text-secondary, #aaa);
}

.bom-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* ===== Feature Dialog extras ===== */

/* ── Shell face removal list (SOL-I2) ── */
.shell-face-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.shell-face-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.shell-face-label {
  flex: 1;
}

/* SOL-I7: per-face thickness input */
.shell-face-thickness {
  width: 54px;
  padding: 2px 4px;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 11px;
  text-align: right;
}

.shell-face-thickness:focus {
  outline: none;
  border-color: var(--accent);
}
.dialog-sm {
  min-width: 340px;
  max-width: 400px;
}

.dialog-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.dialog-hint--error {
  color: var(--error, #f44336);
  font-style: normal;
  font-weight: 500;
}

.direction-inputs {
  display: flex;
  gap: 6px;
}

.direction-inputs input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.direction-inputs input:focus {
  border-color: var(--accent);
}

.boolean-preview {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.boolean-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bool-icon {
  font-size: 20px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--accent-light);
  border: 1px solid var(--border-light);
}

.bool-icon.join { color: var(--success); }
.bool-icon.cut { color: var(--error); }
.bool-icon.intersect { color: var(--warning); }


/* === Missing classes restored from App.css extraction ===
   These were removed from App.css but not placed in any extracted file. */

.distance-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  margin-top: 4px;
}

.distance-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.advanced-toggle {
  width: 100%;
  text-align: center;
  font-size: 12px;
}

.print-estimate {
  background: var(--accent-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
}

.print-estimate h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dialog-media-preview {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.dialog-hint-text {
  font-size: 12px;
  opacity: 0.7;
}

.dialog-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-slider-row__input {
  flex: 1;
}

.dialog-slider-row__value {
  width: 36px;
  font-size: 12px;
}

.dialog-field-row {
  display: flex;
  gap: 8px;
}

.dialog-field-col {
  flex: 1;
}


/* ===================================================================
 * Fusion-style dialog primitives
 * — collapsible section, horizontal row, segmented icon picker,
 *   face-selector chip, inline units input, floating dim chip.
 * =================================================================== */

/* Horizontal label + control row (mirrors Fusion 360's property grid). */
.dialog-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 12px;
}

.dialog-row > label {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* Collapsible section */
.dialog-section {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dialog-section:first-child {
  border-top: none;
  padding-top: 0;
}

.dialog-section__header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.dialog-section__chevron {
  transition: transform 0.12s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dialog-section__chevron.open {
  transform: rotate(90deg);
}

.dialog-section__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 2px;
}

/* Segmented icon picker — the row of toggle icons for Hole Type / Tap Type / Drill Point */
.seg-icons {
  display: inline-flex;
  gap: 4px;
}

.seg-icons__btn {
  width: 28px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.seg-icons__btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.seg-icons__btn.active {
  background: #0078d7;
  border-color: #0078d7;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.seg-icons__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Face-selector chip — "Select" placeholder → "1 selected" filled chip with × */
.face-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.face-selector__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.face-selector__btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.face-selector__btn.active {
  background: #0078d7;
  border-color: #0078d7;
  color: #fff;
}

.face-selector__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  background: #0078d7;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
}

.face-selector__chip-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  cursor: pointer;
}

.face-selector__chip-clear:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Distance / extents dropdown + inline units input  */
.units-input {
  display: flex;
  align-items: center;
  gap: 4px;
}

.units-input select,
.units-input input[type="number"] {
  height: 26px;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.units-input input[type="number"] {
  flex: 1;
  min-width: 60px;
}

.units-input__ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-muted);
  cursor: pointer;
}

.units-input__ext:hover {
  background: var(--bg-hover);
}

/* Non-modal overlay variant — used when the dialog needs to coexist with
   viewport interaction (e.g. picking a face). Backdrop is transparent and
   ignores pointer events; the dialog itself sits top-right like Fusion 360. */
.dialog-overlay.dialog-overlay--passthrough {
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 56px 16px 16px;
}

.dialog-overlay.dialog-overlay--passthrough .dialog {
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
/* Hole tool — uses the canonical tool-panel look + small extras. */

/* The panel needs a transparent overlay so the canvas stays interactive
   for face picking. */
.hole-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.hole-panel {
  pointer-events: auto;
}

.tp-header-icon.hole { background: #3b82f6; }

/* Schematic hole diagram (head depth / drill angle / diameter inputs). */
.hole-diagram {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 10px;
  margin: 4px 0;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-elevated);
}

.hole-diagram__svg {
  grid-column: 1;
  grid-row: 1 / span 3;
  justify-self: center;
  color: var(--text-secondary);
}

.hole-diagram__fields {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hole-diagram__field {
  flex: 0 0 auto;
}

/* Floating 3D-anchored diameter chip (drei <Html> overlay). */
.hole-dim-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  font-size: 11px;
  color: var(--text-primary);
  user-select: none;
}

.hole-dim-chip input {
  width: 56px;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font-size: 11px;
  text-align: right;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

.hole-dim-chip input:focus {
  background: var(--accent-light);
  border-radius: 2px;
}

.hole-dim-chip__unit {
  color: var(--text-muted);
  font-size: 10px;
}

.tp-label--full {
  min-width: 0;
  white-space: normal;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
/* ===== Boundary Fill Dialog ===== */
.boundary-fill-body-list {
  max-height: 120px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px;
}

.boundary-fill-empty {
  font-size: 12px;
  color: var(--text-muted);
}

.boundary-fill-body-item {
  display: flex;
  gap: 6px;
  padding: 2px 0;
}
/* ===== Drive Joints Dialog ===== */

/* Transport control bar */
.drive-joints-transport {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.drive-joints-btn {
  padding: 3px 8px;
}

.drive-joints-loop-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
}

.drive-joints-loop-label {
  font-size: 11px;
}

.drive-joints-loop-on {
  font-size: 11px;
  color: #4caf50;
}

.drive-joints-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-secondary, #aaa);
}

/* Scrubber */
.drive-joints-scrubber {
  width: 100%;
}

/* Tracks section */
.drive-joints-tracks {
  margin-bottom: 8px;
}

.drive-joints-tracks__heading {
  margin-bottom: 4px;
}

.drive-joints-track-row {
  display: grid;
  grid-template-columns: 1fr 70px 70px 110px 28px;
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
}

.drive-joints-track-name {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-joints-track-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.drive-joints-track-col__label {
  font-size: 10px;
  color: var(--color-text-secondary, #888);
}

.drive-joints-track-input {
  padding: 2px 4px;
  font-size: 12px;
}

/* Add-track row */
.drive-joints-add-row {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.drive-joints-add-label {
  white-space: nowrap;
}

.drive-joints-add-select {
  flex: 1;
}

/* Empty state */
.drive-joints-empty {
  font-size: 12px;
  color: var(--color-text-secondary, #888);
  padding: 8px 0;
}

/* Duration row */
.drive-joints-duration-row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.drive-joints-duration-label {
  white-space: nowrap;
}

.drive-joints-duration-input {
  width: 80px;
}
.rigid-group__list {
  border: 1px solid var(--border);
  border-radius: 4px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px 0;
}

.rigid-group__empty {
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 8px;
  margin: 0;
}

.rigid-group__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 13px;
}

.rigid-group__color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.appearance-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.tp-header-icon.appearance {
  background: #8b5cf6;
}

.appearance-panel {
  pointer-events: auto;
}

.appearance-color {
  width: 100%;
  height: 26px;
  padding: 2px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
}
/* ===== Export Dialog ===== */
.export-dialog {
  min-width: 480px;
  max-width: 560px;
}

.export-body {
  max-height: 60vh;
  overflow-y: auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.advanced-toggle {
  width: 100%;
  text-align: center;
  font-size: 12px;
}

.print-estimate {
  background: var(--accent-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
}

.print-estimate h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.estimate-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 12px;
}

.estimate-grid span:nth-child(odd) {
  color: var(--text-muted);
}

.estimate-grid span:nth-child(even) {
  color: var(--text-primary);
}

.printer-upload-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label.indent {
  margin-left: 24px;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
}

