/* ── LEFT PANEL ── */
#pages-section {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  max-height: 200px;
  overflow-y: auto;
}
#layers-section { flex: 1; overflow-y: auto; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text3);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.panel-header button {
  width: 22px; height: 22px;
  border-radius: 4px;
  color: var(--text2);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}
.panel-header button:hover { background: var(--surface2); }
.panel-header-actions { display: flex; gap: 4px; }

/* Pages */
.page-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text2);
  transition: background 0.1s;
  border-left: 2px solid transparent;
}
.page-item:hover { background: var(--surface2); }
.page-item.active { background: var(--accent-light); color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.page-item-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-item input {
  flex: 1;
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 12px;
  background: white;
  outline: none;
}
.page-del { opacity: 0; width: 18px; height: 18px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text3); }
.page-item:hover .page-del { opacity: 1; }
.page-del:hover { background: var(--border2); color: var(--danger); }

/* Layers */
.layer-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text2);
  transition: background 0.1s;
  border-left: 2px solid transparent;
}
.layer-item:hover { background: var(--surface2); }
.layer-item.selected { background: var(--accent-light); color: var(--text); border-left-color: var(--accent); }
.layer-item.locked { opacity: 0.6; }
.layer-icon { font-size: 11px; flex-shrink: 0; opacity: 0.7; }
.layer-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.layer-actions { display: flex; gap: 2px; opacity: 0; }
.layer-item:hover .layer-actions { opacity: 1; }
.layer-action-btn { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 3px; font-size: 11px; color: var(--text3); }
.layer-action-btn:hover { background: var(--border); color: var(--text); }
.layer-indent { display: block; width: 12px; flex-shrink: 0; }

/* ── RIGHT PANEL ── */
#props-panel { padding: 0; }
.no-selection-hint { padding: 16px; font-size: 12px; color: var(--text3); text-align: center; line-height: 1.5; }

.props-section { border-bottom: 1px solid var(--border); padding: 10px 12px; }
.props-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text3);
  margin-bottom: 8px;
}

.prop-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.prop-row:last-child { margin-bottom: 0; }

.prop-label {
  font-size: 11px;
  color: var(--text3);
  width: 60px;
  flex-shrink: 0;
}
.prop-label.wide { width: 80px; }

.prop-input {
  flex: 1;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.1s;
}
.prop-input:focus { border-color: var(--accent); background: white; }

.prop-input-pair { display: flex; gap: 4px; flex: 1; }
.prop-input-pair .prop-input { flex: 1; }

.prop-color-row { display: flex; gap: 6px; align-items: center; flex: 1; }
.prop-color-swatch {
  width: 26px; height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}
.prop-color-swatch input[type=color] { opacity: 0; width: 100%; height: 100%; cursor: pointer; }

.prop-select {
  flex: 1;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 6px;
  font-size: 11px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.prop-btn-row { display: flex; gap: 4px; flex: 1; }
.prop-btn {
  flex: 1;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text2);
  background: var(--bg);
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prop-btn:hover { background: var(--surface2); border-color: var(--border2); color: var(--text); }
.prop-btn.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

.prop-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border2);
  outline: none;
}
.prop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--accent);
  cursor: pointer;
}

.element-name-input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  outline: none;
  margin-bottom: 8px;
}
.element-name-input:focus { border-color: var(--accent); background: white; }

.prop-toggle-lock {
  width: 100%;
  height: 28px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all 0.1s;
}
.prop-toggle-lock:hover { background: var(--border); }
.prop-toggle-lock.locked { background: var(--warning); color: white; border-color: var(--warning); }
