:root {
  --bg: #1c2430;
  --panel: #141a24;
  --line: #2c3848;
  --text: #e8edf4;
  --muted: #8a97a8;
  --accent: #3d7eff;
  --danger: #d94c4c;
  --canvas: #dfe7d8;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 14px/1.4 system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: #8cb4ff; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: #ff8a8a; font-size: 13px; }

.login-wrap { height: 100%; display: grid; place-items: center; }
.login-card {
  width: 360px; background: var(--panel); padding: 28px; border-radius: 16px;
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px;
}
.login-card h1 { margin: 0; font-size: 22px; }
.login-card label { display: flex; flex-direction: column; gap: 4px; }
.login-card input, .props input, .title {
  background: #0f141c; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}
button, .file-btn {
  background: #243044; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { background: var(--danger); border: 0; color: #fff; }
button.ghost { background: transparent; }
button.active { outline: 2px solid var(--accent); }
.file-btn input { display: none; }

.app { display: grid; grid-template-columns: 240px 1fr; height: 100%; }
.sidebar {
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.scheme-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.scheme-list button { text-align: left; }
.scheme-list button.current { background: #243a5c; }

.main { display: flex; flex-direction: column; min-width: 0; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.title { min-width: 180px; flex: 1; }
.tools { display: flex; flex-wrap: wrap; gap: 4px; }
.workspace { flex: 1; display: grid; grid-template-columns: 1fr 260px; min-height: 0; }
#cv { width: 100%; height: 100%; background: var(--canvas); cursor: crosshair; }
.props { border-left: 1px solid var(--line); background: var(--panel); padding: 12px; overflow: auto; }
.props h3 { margin: 12px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.props label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.share-list label { flex-direction: row; align-items: center; gap: 8px; }
.share-list input { width: auto; }
