* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: #1e1e1e;
  color: #d4d4d4;
  height: 100vh;
  overflow: hidden;
}

.hidden { display: none !important; }
.error { color: #e06c75; font-size: 0.85rem; margin-top: 8px; }

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: #252525;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 32px;
  width: 480px;
  text-align: center;
}

.modal-content h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #d4d4d4;
}

.modal-content p {
  color: #888;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.modal-content input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1e1e1e;
  color: #d4d4d4;
  font-size: 0.9rem;
  outline: none;
}

.modal-content input:focus {
  border-color: #6c8ccf;
}

.modal-content button {
  margin-top: 14px;
  padding: 10px 28px;
  border: none;
  border-radius: 6px;
  background: #6c8ccf;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
}

.modal-content button:hover {
  background: #7fa1e0;
}

/* ── App layout ── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Sidebar ── */
#sidebar {
  width: 260px;
  min-width: 260px;
  background: #252525;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#sidebar-header #vault-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d4d4d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-actions {
  display: flex;
  gap: 6px;
}

#new-project-btn {
  background: #3a86ff;
  border: none;
  color: #fff;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  flex: 1;
}

#new-project-btn:hover {
  background: #4c91ff;
}

#change-vault-btn {
  background: none;
  border: 1px solid #444;
  color: #999;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

#change-vault-btn:hover {
  background: #333;
  color: #d4d4d4;
}

#file-tree {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* ── Tree items ── */
.tree-item {
  cursor: pointer;
  user-select: none;
}

.tree-item-content {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px;
  font-size: 0.85rem;
  color: #b0b0b0;
  line-height: 1.6;
}

.tree-item-content:hover {
  background: #2d2d2d;
  color: #d4d4d4;
}

.tree-item-content.active {
  background: #2d2d2d;
  color: #d4d4d4;
}

.tree-item-content .icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: #888;
  font-size: 0.7rem;
}

.tree-item-content .project-badge {
  font-size: 0.75rem;
  margin-right: 2px;
}

.tree-item-content .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-item-content .name.file {
  color: #b0b0b0;
}

.tree-item-content .name.folder {
  color: #d4d4d4;
  font-weight: 500;
}

.tree-children {
  padding-left: 16px;
}

/* ── Main area ── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#content-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #555;
}

#empty-state h2 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 8px;
}

#empty-state p {
  font-size: 0.85rem;
}

#note-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 48px;
  overflow-y: auto;
  height: 100%;
  width: 100%;
}

#note-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #333;
}

#note-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #d4d4d4;
  word-break: break-word;
  margin: 0;
}

#note-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#edit-toggle-btn {
  background: none;
  border: 1px solid #444;
  color: #999;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

#edit-toggle-btn:hover {
  background: #333;
  color: #d4d4d4;
}

#edit-toggle-btn.active {
  background: #6c8ccf;
  border-color: #6c8ccf;
  color: #fff;
}

#save-indicator {
  font-size: 0.75rem;
  color: #666;
}

#save-indicator.saving {
  color: #e5c07b;
}

#save-indicator.saved {
  color: #6c8ccf;
}

#save-indicator.error {
  color: #e06c75;
}

/* ── Markdown body styling ── */
.markdown-body {
  line-height: 1.7;
  font-size: 0.95rem;
  color: #d4d4d4;
}

.markdown-body h1 { font-size: 1.6rem; font-weight: 600; margin: 24px 0 12px; color: #e0e0e0; }
.markdown-body h2 { font-size: 1.35rem; font-weight: 600; margin: 22px 0 10px; color: #e0e0e0; }
.markdown-body h3 { font-size: 1.15rem; font-weight: 600; margin: 20px 0 8px; color: #e0e0e0; }
.markdown-body h4, .markdown-body h5, .markdown-body h6 { font-size: 1rem; font-weight: 600; margin: 18px 0 8px; color: #e0e0e0; }

.markdown-body p { margin: 8px 0; }
.markdown-body a { color: #6c8ccf; text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body strong { color: #e0e0e0; font-weight: 600; }

.markdown-body code {
  background: #2d2d2d;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85em;
  color: #e5c07b;
}

.markdown-body pre {
  background: #2d2d2d;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

.markdown-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: #d4d4d4;
  font-size: 0.85rem;
}

.markdown-body blockquote {
  border-left: 3px solid #6c8ccf;
  padding: 4px 16px;
  margin: 12px 0;
  color: #999;
  background: #252525;
  border-radius: 0 4px 4px 0;
}

.markdown-body ul, .markdown-body ol {
  margin: 8px 0;
  padding-left: 24px;
}

.markdown-body li { margin: 4px 0; }
.markdown-body img { max-width: 100%; border-radius: 6px; }
.markdown-body hr { border: none; border-top: 1px solid #333; margin: 20px 0; }
.markdown-body table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.markdown-body th, .markdown-body td { border: 1px solid #333; padding: 8px 12px; text-align: left; }
.markdown-body th { background: #252525; font-weight: 600; color: #e0e0e0; }
.markdown-body td { color: #d4d4d4; }
.markdown-body input[type="checkbox"] { margin-right: 6px; accent-color: #6c8ccf; }

/* ── Editor ── */
#note-editor {
  width: 100%;
  min-height: 400px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a1a;
  color: #d4d4d4;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 20px;
  resize: vertical;
  outline: none;
  tab-size: 4;
}

#note-editor:focus { border-color: #6c8ccf; }

/* ==========================================================================
   Project View & Ryan's Project Manager Components
   ========================================================================== */

.rp-root {
  --color-blue: #3a86ff;
  --color-orange: #f77f00;
  --color-green: #2a9d8f;
  --color-purple: #805ad5;
  --color-red: #e63946;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #d4d4d4;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.rp-project-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #1e1e1e;
}

.rp-project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: #252525;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.rp-project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e0e0e0;
}

.rp-view-switcher {
  display: inline-flex;
  align-items: center;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.rp-view-btn {
  padding: 5px 12px;
  border-radius: 4px;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border: none;
}

.rp-view-btn:hover { color: #fff; background: #2d2d2d; }
.rp-view-btn--active { background: #3a86ff; color: #fff; }

/* ── Filter Bar & Toolbar ── */
.rp-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: #222222;
  border-bottom: 1px solid #2d2d2d;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.rp-filter-dropdown-wrapper {
  position: relative;
}

.rp-filter-btn, .rp-sort-btn, .rp-report-btn, .rp-btn-action {
  padding: 6px 12px;
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 5px;
  color: #ccc;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s;
}

.rp-filter-btn:hover, .rp-sort-btn:hover, .rp-report-btn:hover, .rp-btn-action:hover {
  background: #383838;
  color: #fff;
}

.rp-filter-btn--active {
  border-color: #3a86ff;
  color: #3a86ff;
  background: rgba(58, 134, 255, 0.1);
}

.rp-filter-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  width: 220px;
  background: #282828;
  border: 1px solid #444;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 50;
  padding: 6px 0;
}

.rp-filter-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: #ccc;
  cursor: pointer;
}

.rp-filter-menu-item:hover { background: #333; color: #fff; }
.rp-filter-menu-item input[type="checkbox"] { accent-color: #3a86ff; }

.rp-report-btn { background: #805ad5; color: #fff; border: none; }
.rp-report-btn:hover { background: #9067e6; }
.rp-report-btn--cancel { background: #444; }

.rp-generate-action-btn {
  padding: 6px 14px;
  background: #2a9d8f;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.rp-generate-action-btn:hover { background: #36b3a3; }
.rp-report-helper-text { font-size: 0.8rem; color: #888; margin-left: 4px; }

/* ── Splitter Workspace ── */
.project-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.workspace-splitter {
  height: 6px;
  background: #2d2d2d;
  cursor: row-resize;
  flex-shrink: 0;
  transition: background 0.15s;
}

.workspace-splitter:hover { background: #3a86ff; }

/* ── Kanban Board ── */
.rp-kanban-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.rp-kanban-board {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  padding: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
}

.rp-kanban-col {
  display: flex;
  flex-direction: column;
  width: 280px;
  min-width: 280px;
  height: 100%;
  background: #252525;
  border-radius: 8px;
  border: 1px solid #333;
  overflow: hidden;
}

.rp-kanban-col-header {
  display: flex;
  flex-direction: column;
  background: #2a2a2a;
}

.rp-kanban-col-topbar {
  height: 4px;
  width: 100%;
}

.rp-kanban-col-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}

.rp-kanban-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e0e0e0;
}

.rp-kanban-col-count {
  background: #333;
  color: #aaa;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.rp-kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-kanban-cards--over {
  background: rgba(58, 134, 255, 0.08);
}

.rp-kanban-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;

}

.rp-kanban-card:hover {
  border-color: #555;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.rp-kanban-card--overdue {
  border: 1px solid #e63946 !important;
  background: rgba(230, 57, 70, 0.05);
}

.rp-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.rp-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e0e0e0;
  line-height: 1.3;
}

.rp-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.rp-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rp-badge--urgent { background: rgba(230, 57, 70, 0.2); color: #e63946; }
.rp-badge--high { background: rgba(247, 127, 0, 0.2); color: #f77f00; }
.rp-badge--medium { background: rgba(58, 134, 255, 0.2); color: #3a86ff; }
.rp-badge--low { background: rgba(141, 153, 174, 0.2); color: #8d99ae; }
.rp-badge--overdue { background: #e63946; color: #fff; font-weight: 700; }
.rp-badge--subtask { background: #2d2d2d; color: #aaa; border: 1px solid #444; }
.rp-badge--assignee { background: #333; color: #bbb; border-radius: 10px; padding: 2px 8px; }

.rp-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #777;
}

.rp-progress-track {
  height: 4px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.rp-progress-fill {
  height: 100%;
  background: #3a86ff;
  border-radius: 2px;
}

.rp-report-checkbox {
  margin-right: 6px;
  accent-color: #805ad5;
  transform: scale(1.2);
}

/* ── Gantt Timeline View ── */
.rp-gantt-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
}

.rp-gantt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #252525;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.rp-gantt-zoom-controls {
  display: flex;
  gap: 4px;
}

.rp-gantt-today-btn {
  background: #3a86ff;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}

.rp-gantt-today-btn:hover { background: #4c91ff; }

.rp-gantt-container {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.rp-gantt-labels {
  width: 220px;
  min-width: 220px;
  background: #222222;
  border-right: 1px solid #333;
  overflow-y: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.rp-gantt-labels-header {
  height: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #aaa;
  border-bottom: 1px solid #333;
  background: #252525;
}

.rp-gantt-labels-body {
  flex: 1;
  overflow-y: hidden;
}

.rp-gantt-label-row {
  height: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 0.8rem;
  color: #ccc;
  border-bottom: 1px solid #2a2a2a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.rp-gantt-label-row:hover { background: #2d2d2d; color: #fff; }

.rp-gantt-timeline-wrapper {
  flex: 1;
  overflow: auto;
  position: relative;
}

.rp-gantt-svg {
  display: block;
}

/* ── Modals & Overlays ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.rp-modal {
  background: #252525;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 24px;
  width: 420px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rp-modal--large { width: 620px; }

.rp-modal h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.rp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rp-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #aaa;
}

.rp-form-group input, .rp-form-group select, .rp-form-group textarea {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 5px;
  padding: 8px 12px;
  color: #eee;
  font-size: 0.85rem;
  outline: none;
}

.rp-form-group input:focus, .rp-form-group select:focus, .rp-form-group textarea:focus {
  border-color: #3a86ff;
}

.rp-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rp-form-grid .full-width { grid-column: span 2; }

.rp-modal-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.rp-btn {
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.rp-btn--primary { background: #3a86ff; color: #fff; }
.rp-btn--primary:hover { background: #4c91ff; }
.rp-btn--secondary { background: #333; color: #ccc; border: 1px solid #444; }
.rp-btn--secondary:hover { background: #444; color: #fff; }
.rp-btn--danger { background: #e63946; color: #fff; }
.rp-btn--danger:hover { background: #f84f5e; }

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ==========================================================================
   Login Screen
   ========================================================================== */
.login-screen {
  position: fixed; inset: 0;
  background: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.login-card {
  text-align: center;
  max-width: 360px; width: 100%;
}
.login-card h1 { font-size: 2rem; color: #e0e0e0; margin-bottom: 4px; }
.login-card p { color: #888; margin-bottom: 32px; font-size: 0.95rem; }
.sign-in-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 24px; border: 1px solid #444; border-radius: 6px;
  background: #252525; color: #d4d4d4; font-size: 0.9rem;
  cursor: pointer; transition: background 0.15s;
}
.sign-in-btn:hover { background: #333; }
.sign-in-btn svg { flex-shrink: 0; }

/* ==========================================================================
   Top Bar
   ========================================================================== */
#topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px; background: #252525; border-bottom: 1px solid #333;
  flex-shrink: 0;
}
#app-title { font-weight: 700; color: #e0e0e0; font-size: 0.95rem; }
#topbar-breadcrumb { color: #888; font-size: 0.85rem; }
#topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
#user-display { color: #aaa; font-size: 0.8rem; }
#sign-out-btn {
  background: none; border: 1px solid #444; border-radius: 4px;
  color: #999; padding: 4px 10px; font-size: 0.75rem; cursor: pointer;
}
#sign-out-btn:hover { background: #333; color: #d4d4d4; }

/* ==========================================================================
   Vault Dashboard
   ========================================================================== */
#dashboard { padding: 32px; overflow-y: auto; flex: 1; }
#dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
#dashboard-header h2 { font-size: 1.3rem; color: #e0e0e0; font-weight: 600; }
#vault-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.vault-card {
  background: #252525; border: 1px solid #333; border-radius: 8px;
  padding: 20px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.vault-card:hover { border-color: #555; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.vault-card h3 { font-size: 1rem; color: #e0e0e0; margin-bottom: 6px; }
.vault-card p { font-size: 0.8rem; color: #777; margin-bottom: 12px; }
.vault-role-badge {
  font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 4px;
}
.vault-role-admin { background: rgba(58,134,255,0.15); color: #3a86ff; }
.vault-role-write { background: rgba(42,157,143,0.15); color: #2a9d8f; }
.vault-role-read { background: rgba(141,153,174,0.15); color: #8d99ae; }
.empty-message { color: #666; text-align: center; padding: 40px; font-size: 0.9rem; }

/* ==========================================================================
   Vault View
   ========================================================================== */
#vault-view { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.back-btn {
  background: none; border: none; color: #888; font-size: 0.8rem;
  cursor: pointer; padding: 0; text-align: left;
}
.back-btn:hover { color: #d4d4d4; }

.tree-loading { padding: 16px; color: #666; font-size: 0.8rem; }
.tree-loading.error { color: #e06c75; }

/* ==========================================================================
   Member Management Modal
   ========================================================================== */
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #2d2d2d;
}
.member-row:last-child { border-bottom: none; }
.member-row span:first-child { flex: 1; color: #d4d4d4; font-size: 0.85rem; }

/* ==========================================================================
   Attachments (images in rendered markdown)
   ========================================================================== */
.markdown-body img { max-width: 100%; border-radius: 6px; }
.markdown-body a[href$=".pdf"]::before { content: '📎 '; }

/* ==========================================================================
   Admin User Management Panel
   ========================================================================== */
.user-mgmt-container {
  background: #252525; border: 1px solid #444; border-radius: 10px;
  width: 720px; max-height: 80vh; display: flex; flex-direction: column;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.user-mgmt-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #333;
}
.user-mgmt-header h3 { font-size: 1.15rem; color: #fff; margin: 0; }
.user-mgmt-add {
  display: flex; gap: 8px; padding: 12px 20px; border-bottom: 1px solid #2d2d2d;
}
.user-mgmt-add input {
  background: #1a1a1a; border: 1px solid #444; border-radius: 5px;
  padding: 8px 12px; color: #eee; font-size: 0.85rem; outline: none;
}
.user-mgmt-add input:focus { border-color: #3a86ff; }
#user-mgmt-list { flex: 1; overflow-y: auto; padding: 12px 20px; }
.user-mgmt-card {
  background: #1e1e1e; border: 1px solid #2d2d2d; border-radius: 6px;
  padding: 12px; margin-bottom: 10px;
}
.user-mgmt-card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.user-mgmt-card-header strong { color: #e0e0e0; }
.user-mgmt-card-header small { color: #888; }
.user-mgmt-card-header .vault-role-badge { margin-left: 4px; }
.user-mgmt-projects { margin-top: 10px; padding-top: 10px; border-top: 1px solid #2d2d2d; }
.user-mgmt-project-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 0.8rem;
}
.user-mgmt-project-row span:first-child { flex: 1; color: #ccc; }
.user-mgmt-project-row select {
  background: #1a1a1a; border: 1px solid #444; border-radius: 4px;
  color: #eee; font-size: 0.75rem; padding: 2px 6px;
}
.user-mgmt-project-row button {
  background: none; border: 1px solid #444; border-radius: 4px;
  color: #999; cursor: pointer; font-size: 0.75rem; padding: 2px 6px;
}
.user-mgmt-project-row button:hover { background: #333; color: #e06c75; }
.user-mgmt-admin-note { color: #666; font-size: 0.8rem; margin-top: 4px; }

