* { box-sizing: border-box; }
body {
  margin: 0; font: 14px/1.5 system-ui, sans-serif;
  background: #1e1f24; color: #d7d9e0; height: 100vh;
  display: flex; flex-direction: column;
}
header {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 14px; background: #17181c; border-bottom: 1px solid #333;
}
header strong { font-size: 15px; }
#status { flex: 1; color: #8b8e99; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 6px; }
button {
  background: #2a2c33; color: #d7d9e0; border: 1px solid #3c3f47;
  border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px;
}
button:hover:not(:disabled) { background: #35383f; }
button:disabled { opacity: .4; cursor: default; }
main { flex: 1; display: flex; min-height: 0; }
aside#tree {
  width: 280px; overflow: auto; padding: 10px;
  border-right: 1px solid #333; font-family: ui-monospace, Consolas, monospace; font-size: 13px;
}
aside#tree .dir > .name { color: #9ecbff; font-weight: 600; }
aside#tree .node { padding: 2px 4px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
aside#tree .node:hover { background: #2a2c33; }
aside#tree .node.active { background: #324a6b; }
aside#tree .children { margin-left: 14px; }
aside#tree .hint { color: #8b8e99; padding: 4px; }
#editor-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#filebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; background: #17181c; border-bottom: 1px solid #333;
  font-family: ui-monospace, Consolas, monospace; font-size: 13px;
}
#filebar > div { display: flex; gap: 6px; }
#btn-save { background: #2d5a2d; border-color: #3f7a3f; }
#btn-save:hover:not(:disabled) { background: #387038; }
#editor {
  flex: 1; resize: none; border: 0; outline: none; padding: 14px;
  background: #1e1f24; color: #e8e9ee;
  font: 13px/1.6 ui-monospace, Consolas, monospace; tab-size: 2;
}
.error { color: #ff7b72; }
.ok { color: #7ee787; }
