:root {
  --bg: #0f1115;
  --panel: #161922;
  --border: #262b38;
  --text: #e6e8ee;
  --muted: #8a90a2;
  --accent: #5b8cff;
  --danger: #ff5b6d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
}

.login-card h1 { font-size: 18px; margin-bottom: 20px; }

.login-card label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }

.login-card input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d0f14;
  color: var(--text);
}

.login-card button {
  margin-top: 20px;
  width: 100%;
}

.error-msg { color: var(--danger); font-size: 13px; margin-top: 12px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.topbar h1 { font-size: 16px; margin: 0; }

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  padding: 20px;
  height: calc(100vh - 64px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.panel-header h2 { font-size: 14px; margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

button, .btn-primary, .btn-secondary {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); display: inline-block; }

.upload-zone {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.upload-zone.dragover { border-color: var(--accent); background: rgba(91, 140, 255, 0.08); }

.upload-zone p { margin: 4px 0; font-size: 13px; color: var(--muted); }
.upload-zone .hint { font-size: 11px; }

.file-list { list-style: none; padding: 0; margin: 0; }

.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
}

.file-list li:hover { background: rgba(255,255,255,0.03); }

.file-list .file-name { cursor: pointer; }
.file-list .file-meta { color: var(--muted); font-size: 11px; }

.file-list .file-actions button {
  background: transparent;
  color: var(--muted);
  padding: 4px 8px;
}

.file-list .file-actions button:hover { color: var(--danger); }

#doc-title {
  flex: 1;
  padding: 8px;
  background: #0d0f14;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  margin-right: 12px;
}

#quill-editor {
  height: calc(100% - 120px);
  background: white;
  color: black;
  border-radius: 8px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1f2430;
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
}

.toast.error { border-color: var(--danger); color: var(--danger); }

