/* ═══════════════════════════════════════════════════════════════
   CORETRIA GHOST PANEL — Complete CSS
   Redesigned for readability + professional scale
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-void: #020305;
  --bg-deep: #05070c;
  --bg-panel: #0a0d15;
  --bg-card: #0f121c;
  --bg-elevated: #141824;
  --bg-hover: #1a1f2e;
  --text-bright: #f0f4ff;
  --text-main: #c8d0e8;
  --text-muted: #8b94b2;
  --text-dim: #576078;
  --border-subtle: rgba(120, 140, 180, 0.12);
  --border-active: rgba(120, 140, 180, 0.25);
  --sys-primary: #3d7dff;
  --sys-glow: rgba(61, 125, 255, 0.35);
  --web-primary: #00d9b4;
  --web-glow: rgba(0, 217, 180, 0.35);
  --db-primary: #2e8cf0;
  --mail-primary: #a855f7;
  --sec-primary: #ff4757;
  --bak-primary: #8b5cf6;
  --mon-primary: #10b981;
  --ai-primary: #ec4899;
  --status-ok: #22c55e;
  --status-warn: #f59e0b;
  --status-error: #ef4444;
  --status-info: #3b82f6;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --lcars-elbow: 24px;
  --lcars-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-med: 0.25s var(--ease-out);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Rajdhani', system-ui, sans-serif;
  background: var(--bg-void);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 3px; }

/* SHELL */
.shell {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  grid-template-rows: 60px minmax(0, 1fr) 44px;
  grid-template-areas: "rail top" "rail main" "rail bottom";
  height: 100vh;
  background: radial-gradient(ellipse 80% 50% at 20% 0%, rgba(61, 125, 255, 0.05) 0%, transparent 50%), var(--bg-void);
}

/* RAIL */
.rail {
  grid-area: rail;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-deep) 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  gap: 4px;
  z-index: 100;
}
.rail-logo { height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.rail-logo-mark {
  width: 66px; height: 50px;
  background: conic-gradient(from 180deg, var(--sys-primary), var(--ai-primary), var(--web-primary), var(--sys-primary));
  border-radius: 0 0 var(--lcars-elbow) var(--lcars-elbow);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 0 20px -5px var(--sys-glow);
}
.rail-logo-mark::before {
  content: ''; position: absolute; inset: 2px;
  background: var(--bg-deep);
  border-radius: 0 0 calc(var(--lcars-elbow) - 2px) calc(var(--lcars-elbow) - 2px);
}
.rail-logo-mark span {
  position: relative; font-family: 'Orbitron', monospace;
  font-size: 18px; font-weight: 700; letter-spacing: 0.12em; color: var(--text-bright);
}
.rail-domains { flex: 1; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 2px 0; }
.domain-tile {
  width: 100%; min-height: 72px; padding: 12px 8px;
  border-radius: var(--lcars-elbow) var(--radius-sm) var(--radius-sm) var(--lcars-elbow);
  background: var(--bg-card); border: 1px solid transparent;
  cursor: pointer; position: relative;
  transition: all var(--transition-fast);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.domain-tile:hover { background: var(--bg-hover); transform: translateX(2px); }
.domain-tile.active {
  border-color: var(--domain-color); background: var(--bg-elevated);
  transform: translateX(4px); box-shadow: 0 0 20px -5px var(--domain-glow);
}
.domain-tile-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--domain-color);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.domain-tile-label {
  font-family: 'Orbitron', monospace; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); text-align: center;
}
.domain-tile.active .domain-tile-label { color: var(--text-bright); }
.domain-tile-status {
  position: absolute; top: 6px; right: 6px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--status-ok); box-shadow: 0 0 6px var(--status-ok);
}
.domain-tile-status.warn { background: var(--status-warn); box-shadow: 0 0 6px var(--status-warn); }
.domain-tile-status.error { background: var(--status-error); box-shadow: 0 0 6px var(--status-error); }
.rail-footer { padding: 10px 0; text-align: center; border-top: 1px solid var(--border-subtle); }
.rail-footer-text { font-family: 'Share Tech Mono', monospace; font-size: 10px; color: var(--text-dim); letter-spacing: 0.08em; }

/* TOP BAR */
.top-bar {
  grid-area: top; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(90deg, var(--bg-panel) 0%, var(--bg-deep) 50%, var(--bg-panel) 100%);
  border-bottom: 1px solid var(--border-subtle); gap: 16px;
}
.top-left { display: flex; align-items: center; gap: 14px; }
.server-identity {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 10px;
  background: rgba(61, 125, 255, 0.08); border: 1px solid rgba(61, 125, 255, 0.3);
  border-radius: var(--lcars-pill); cursor: pointer; transition: all var(--transition-fast);
}
.server-identity:hover { background: rgba(61, 125, 255, 0.15); }
.server-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--status-ok); box-shadow: 0 0 8px var(--status-ok);
  animation: pulse-slow 2s ease-in-out infinite;
}
@keyframes pulse-slow { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.server-name { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 600; color: var(--text-bright); }
.server-meta { font-family: 'Share Tech Mono', monospace; font-size: 11px; color: var(--text-muted); }
.prep-badge {
  display: flex; align-items: center; gap: 6px; padding: 5px 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.4); border-radius: var(--lcars-pill); cursor: pointer;
}
.prep-badge .prep-value { font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 700; color: var(--status-ok); }
.prep-badge .prep-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.top-center { flex: 1; max-width: 480px; min-width: 180px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-input {
  width: 100%; padding: 8px 16px 8px 36px;
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--lcars-pill);
  font-family: 'Rajdhani', sans-serif; font-size: 14px; color: var(--text-main);
  outline: none; transition: all var(--transition-fast);
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { border-color: var(--sys-primary); box-shadow: 0 0 0 2px var(--sys-glow); }
.search-icon { position: absolute; left: 12px; font-size: 13px; color: var(--text-dim); }
.top-right { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.top-btn {
  padding: 6px 16px; background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); font-family: 'Rajdhani', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--text-main); cursor: pointer;
  transition: all var(--transition-fast);
}
.top-btn:hover { background: var(--bg-hover); border-color: var(--border-active); }

/* MAIN */
.main-content {
  grid-area: main; display: grid; grid-template-columns: 1fr 280px;
  gap: 16px; padding: 16px; overflow: hidden;
}
.main-left { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding-right: 6px; min-width: 0; }
.main-right { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding-right: 4px; min-width: 0; }

/* PANEL */
.panel {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); display: flex; flex-direction: column;
  overflow: visible;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border-subtle); min-height: 62px; gap: 14px;
  flex-shrink: 0;
}
.panel-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.panel-badge {
  padding: 5px 14px;
  background: var(--badge-color, var(--sys-primary));
  border-radius: var(--radius-sm) 0 var(--radius-sm) 0;
  font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--bg-void); text-transform: uppercase;
  white-space: nowrap;
}
.panel-title { font-family: 'Orbitron', monospace; font-size: 18px; font-weight: 600; color: var(--text-bright); }
.panel-subtitle { font-size: 14px; color: var(--text-muted); }
.panel-meta { font-size: 14px; color: var(--text-muted); }
.panel-body { padding: 20px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); font-family: 'Rajdhani', sans-serif;
  font-size: 15px; font-weight: 600; color: var(--text-main);
  cursor: pointer; transition: all var(--transition-fast); white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-active); transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-primary { background: var(--sys-primary); border-color: transparent; color: var(--bg-void); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 0 15px var(--sys-glow); }
.btn-danger { background: rgba(239, 68, 68, 0.2); border-color: var(--status-error); color: var(--status-error); }
.btn-block { width: 100%; }
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--border-subtle);
  border-top-color: var(--sys-primary); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* BOTTOM BAR */
.bottom-bar {
  grid-area: bottom; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(90deg, var(--bg-panel) 0%, var(--bg-deep) 50%, var(--bg-panel) 100%);
  border-top: 1px solid var(--border-subtle); font-size: 12px; color: var(--text-muted);
}
.telemetry-group { display: flex; align-items: center; gap: 20px; }
.telemetry-metric { display: flex; align-items: center; gap: 6px; }
.telemetry-icon { font-size: 13px; opacity: 0.8; }
.telemetry-label { font-family: 'Share Tech Mono', monospace; font-size: 11px; color: var(--text-dim); font-weight: 500; }
.telemetry-value { font-family: 'Share Tech Mono', monospace; font-size: 12px; color: var(--text-main); min-width: 36px; }
.telemetry-bar { width: 56px; height: 5px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.telemetry-bar-fill { height: 100%; background: var(--status-ok); transition: width var(--transition-med); border-radius: 3px; }
.telemetry-bar-fill.warn { background: var(--status-warn); }
.telemetry-bar-fill.error { background: var(--status-error); }
.bottom-right { display: flex; align-items: center; gap: 16px; }
.connection-status { display: flex; align-items: center; gap: 6px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--status-ok); box-shadow: 0 0 6px var(--status-ok); }
.connection-dot.error { background: var(--status-error); box-shadow: 0 0 6px var(--status-error); }
.timestamp { font-family: 'Share Tech Mono', monospace; font-size: 12px; }

/* EXEC PANEL */
.exec-panel {
  position: fixed; bottom: 0; left: 100px; right: 0; height: 45vh;
  background: var(--bg-panel); border-top: 1px solid var(--border-active);
  transform: translateY(100%); transition: transform var(--transition-med);
  z-index: 200; display: flex; flex-direction: column;
  box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.6);
}
.exec-panel.visible { transform: translateY(0); }
.exec-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--bg-elevated); border-bottom: 1px solid var(--border-subtle);
}
.exec-header-left { display: flex; align-items: center; gap: 12px; }
.exec-label { font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 600; color: var(--text-bright); }
.exec-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.exec-tabs { display: flex; gap: 4px; }
.exec-tab {
  padding: 6px 14px; background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-family: 'Rajdhani', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition-fast);
}
.exec-tab:hover { background: var(--bg-hover); }
.exec-tab.active { background: var(--sys-primary); color: var(--bg-void); }
.exec-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--text-muted); cursor: pointer; font-size: 18px; transition: all var(--transition-fast);
}
.exec-close:hover { background: var(--bg-hover); color: var(--text-bright); }
.exec-body { flex: 1; overflow: hidden; position: relative; }
.exec-view {
  position: absolute; inset: 0; padding: 16px 20px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity var(--transition-fast);
}
.exec-view.visible { opacity: 1; visibility: visible; }
.exec-cli-cmd {
  font-family: 'Share Tech Mono', monospace; font-size: 13px; color: var(--sys-primary);
  padding: 8px 14px; background: var(--bg-void); border-radius: var(--radius-sm); margin-bottom: 12px;
}
.exec-cli-out {
  font-family: 'Share Tech Mono', monospace; font-size: 13px; color: var(--text-main);
  background: var(--bg-void); border-radius: var(--radius-md); padding: 16px;
  min-height: 180px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; line-height: 1.6;
}
.exec-graph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(2, 3, 5, 0.85); backdrop-filter: blur(8px);
  z-index: 300; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all var(--transition-med);
}
.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal {
  width: 90%; max-width: 620px; max-height: 85vh;
  background: var(--bg-panel); border: 1px solid var(--border-active); border-radius: var(--radius-lg);
  overflow: hidden; transform: scale(0.95) translateY(20px); transition: transform var(--transition-med);
  display: flex; flex-direction: column;
}
.modal-overlay.visible .modal { transform: scale(1) translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; background: var(--bg-elevated); border-bottom: 1px solid var(--border-subtle);
}
.modal-title { font-family: 'Orbitron', monospace; font-size: 16px; font-weight: 600; color: var(--text-bright); }
.modal-body { flex: 1; padding: 24px; overflow-y: auto; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 18px 24px; background: var(--bg-card); border-top: 1px solid var(--border-subtle);
}

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.form-input, .form-select {
  width: 100%; padding: 11px 16px;
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  font-family: 'Rajdhani', sans-serif; font-size: 15px; color: var(--text-main);
  outline: none; transition: all var(--transition-fast);
}
.form-input:focus, .form-select:focus { border-color: var(--sys-primary); box-shadow: 0 0 0 3px var(--sys-glow); }
.form-select { appearance: none; cursor: pointer; }

/* CARDS */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  padding: 18px; background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast);
}
.card:hover { background: var(--bg-hover); border-color: var(--border-active); transform: translateY(-2px); }
.card-title { font-weight: 600; font-size: 15px; color: var(--text-bright); margin-bottom: 4px; }
.card-meta { font-size: 12px; color: var(--text-muted); }

/* CUBE COMMANDS */
.cube-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cube-cmd {
  padding: 14px; background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); cursor: pointer; position: relative; overflow: hidden;
  transition: all var(--transition-fast);
}
.cube-cmd::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--cube-color, var(--sys-primary)); opacity: 0.7;
}
.cube-cmd:hover {
  background: var(--bg-hover); border-color: var(--cube-color, var(--sys-primary));
  transform: translateY(-2px); box-shadow: 0 0 20px -5px var(--cube-glow, var(--sys-glow));
}
.cube-label { font-weight: 600; font-size: 14px; color: var(--text-bright); }
.cube-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* STATUS */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--lcars-pill); font-size: 12px; font-weight: 600;
}
.status-badge.ok { background: rgba(34, 197, 94, 0.15); color: var(--status-ok); }
.status-badge.warn { background: rgba(245, 158, 11, 0.15); color: var(--status-warn); }
.status-badge.error { background: rgba(239, 68, 68, 0.15); color: var(--status-error); }
.status-badge.info { background: rgba(59, 130, 246, 0.15); color: var(--status-info); }

.checklist { display: flex; flex-direction: column; gap: 10px; }

/* RESPONSIVE */
@media (max-width: 1100px) { .main-content { grid-template-columns: 1fr; } .main-right { display: none; } }
@media (max-width: 700px) { .shell { grid-template-columns: 100px minmax(0, 1fr); } .top-center { display: none; } .exec-panel { left: 100px; } }

/* ═══════════════════════════════════════════════════════════════
   FILE MANAGER
   ═══════════════════════════════════════════════════════════════ */

.fm-breadcrumbs {
  display: flex; align-items: center; gap: 5px; padding: 10px 18px;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border-subtle);
  font-size: 13px; overflow-x: auto; white-space: nowrap;
}
.fm-crumb { padding: 3px 8px; border-radius: var(--radius-sm); color: var(--text-muted); }
.fm-crumb-link { cursor: pointer; transition: all var(--transition-fast); }
.fm-crumb-link:hover { background: var(--bg-hover); color: var(--text-bright); }
.fm-crumb-sep { color: var(--text-dim); font-size: 12px; }
.fm-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fm-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--card-accent, var(--border-subtle));
  border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast);
  position: relative; min-height: 60px;
}
.fm-card:hover { background: var(--bg-hover); border-color: var(--border-active); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.fm-card-dir { border-left-color: var(--sys-primary); }
.fm-card-selected { background: rgba(61, 125, 255, 0.1); border-color: var(--sys-primary); box-shadow: 0 0 0 1px var(--sys-glow); }
.fm-card-select { position: absolute; top: 8px; right: 8px; z-index: 2; }
.fm-checkbox {
  width: 16px; height: 16px; border: 1.5px solid var(--border-active); border-radius: 3px;
  transition: all var(--transition-fast); display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: transparent;
}
.fm-checkbox:hover { border-color: var(--sys-primary); }
.fm-checkbox.checked { background: var(--sys-primary); border-color: var(--sys-primary); color: #fff; }
.fm-checkbox.checked::after { content: '✓'; }
.fm-card-icon { font-size: 24px; flex-shrink: 0; width: 36px; text-align: center; }
.fm-card-body { flex: 1; min-width: 0; }
.fm-card-name { font-weight: 600; font-size: 14px; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-card-meta { display: flex; gap: 10px; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.fm-card-type { font-weight: 600; letter-spacing: 0.04em; }
.fm-card-arrow { color: var(--text-dim); font-size: 18px; flex-shrink: 0; }
.fm-list { display: flex; flex-direction: column; font-size: 13px; }
.fm-list-header {
  display: grid; grid-template-columns: 28px 32px 1fr 80px 80px 100px; gap: 6px;
  padding: 8px 12px; background: var(--bg-elevated); border-radius: var(--radius-sm);
  font-weight: 600; font-size: 11px; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 4px;
}
.fm-list-row {
  display: grid; grid-template-columns: 28px 32px 1fr 80px 80px 100px; gap: 6px;
  padding: 8px 12px; align-items: center; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition-fast); border: 1px solid transparent;
}
.fm-list-row:hover { background: var(--bg-hover); }
.fm-list-row-selected { background: rgba(61, 125, 255, 0.08); border-color: rgba(61, 125, 255, 0.3); }
.fm-list-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-bright); font-weight: 500; font-size: 13px; }
.fm-list-type { font-size: 11px; font-weight: 600; }
.fm-list-size, .fm-list-date { font-size: 12px; color: var(--text-muted); }
.fm-list-check { display: flex; align-items: center; justify-content: center; }
.fm-list-icon { font-size: 16px; text-align: center; }
.fm-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-muted); font-size: 15px; }
.fm-empty-icon { font-size: 52px; margin-bottom: 14px; opacity: 0.5; }
.fm-dragover { background: rgba(61, 125, 255, 0.05) !important; border: 2px dashed var(--sys-primary) !important; border-radius: var(--radius-md); }

/* Search bar */
.fm-search-bar { padding: 8px 14px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-deep); }
.fm-search-input-wrap { display: flex; align-items: center; gap: 6px; background: var(--bg-void); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 2px 8px; transition: border-color var(--transition-fast); }
.fm-search-input-wrap:focus-within { border-color: var(--sys-primary); box-shadow: 0 0 0 2px rgba(61,125,255,0.15); }
.fm-search-icon { font-size: 13px; flex-shrink: 0; }
.fm-search-input { flex: 1; border: none; background: transparent; color: var(--text-bright); font-size: 13px; padding: 6px 4px; outline: none; font-family: inherit; min-width: 0; }
.fm-search-input::placeholder { color: var(--text-dim); }
.fm-search-toggle { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-muted); cursor: pointer; white-space: nowrap; flex-shrink: 0; padding: 4px 6px; border-radius: var(--radius-sm); transition: all var(--transition-fast); }
.fm-search-toggle:hover { background: var(--bg-hover); color: var(--text-bright); }
.fm-search-toggle input { accent-color: var(--sys-primary); width: 13px; height: 13px; cursor: pointer; }

/* Search results */
.fm-search-results-header { padding: 10px 0 8px; display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.fm-search-result { cursor: pointer; }
.fm-search-path { font-size: 10px; color: var(--text-dim); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-search-preview { font-size: 11px; color: var(--text-muted); margin-top: 3px; padding: 3px 8px; background: var(--bg-deep); border-radius: var(--radius-sm); font-family: 'Share Tech Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 500px; border-left: 2px solid var(--sys-primary); }

/* Move modal directory picker */
.fm-move-breadcrumb { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 12px; padding: 6px 0; }
.fm-move-crumb { padding: 2px 6px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted); transition: all var(--transition-fast); }
.fm-move-crumb:hover { background: var(--bg-hover); color: var(--text-bright); }
.fm-move-sep { color: var(--text-dim); font-size: 11px; }
.fm-move-dir-list { background: var(--bg-void); }
.fm-move-dir-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-size: 13px; color: var(--text-bright); border-bottom: 1px solid var(--border-subtle); transition: all var(--transition-fast); }
.fm-move-dir-item:last-child { border-bottom: none; }
.fm-move-dir-item:hover { background: var(--bg-hover); }

/* FILE EDITOR */
.fm-editor-wrap { display: flex; background: var(--bg-void); border-top: 1px solid var(--border-subtle); overflow: hidden; position: relative; }
.fm-line-numbers { width: 48px; background: var(--bg-deep); border-right: 1px solid var(--border-subtle); overflow: hidden; padding: 14px 0; flex-shrink: 0; user-select: none; }
.fm-line-num { padding: 0 10px; text-align: right; font-family: 'Share Tech Mono', monospace; font-size: 13px; line-height: 1.6; color: var(--text-dim); height: 20.8px; }
.fm-editor-container { flex: 1; position: relative; overflow: hidden; }
.fm-editor-highlight {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  font-family: 'Share Tech Mono', monospace; font-size: 13px; line-height: 1.6;
  padding: 14px 16px; white-space: pre; tab-size: 2;
  pointer-events: none; overflow: auto; color: var(--text-bright); z-index: 0;
}
.fm-editor-highlight code { font-family: inherit; font-size: inherit; line-height: inherit; }
.fm-editor {
  position: relative; z-index: 1;
  width: 100%; min-height: 100%; background: transparent; border: none;
  color: var(--text-bright); caret-color: var(--text-bright);
  font-family: 'Share Tech Mono', monospace; font-size: 13px; line-height: 1.6;
  padding: 14px 16px; outline: none; resize: none; tab-size: 2; white-space: pre;
  overflow: auto;
}
.fm-editor.has-highlight { color: transparent; caret-color: var(--text-bright); }
.fm-editor.has-highlight::selection { background: rgba(61, 125, 255, 0.3); }
.fm-editor::selection { background: rgba(61, 125, 255, 0.3); }
/* Syntax token colors */
.hl-kw { color: #c678dd; }
.hl-str { color: #98c379; }
.hl-num { color: #d19a66; }
.hl-cm { color: #5c6370; font-style: italic; }
.hl-fn { color: #61afef; }
.hl-op { color: #56b6c2; }
.hl-tag { color: #e06c75; }
.hl-attr { color: #d19a66; }
.hl-val { color: #98c379; }
.hl-sel { color: #e06c75; }
.hl-prop { color: #61afef; }
.hl-re { color: #56b6c2; }
.fm-editor-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 6px 16px; background: var(--bg-deep); border-top: 1px solid var(--border-subtle);
  font-family: 'Share Tech Mono', monospace; font-size: 11px; color: var(--text-muted);
}
.fm-editor[data-lang="javascript"], .fm-editor[data-lang="typescript"] { caret-color: #f7df1e; }
.fm-editor[data-lang="python"] { caret-color: #3776ab; }
.fm-editor[data-lang="html"] { caret-color: #e44d26; }
.fm-editor[data-lang="css"], .fm-editor[data-lang="scss"] { caret-color: #264de4; }
.fm-editor[data-lang="json"] { caret-color: #5b5ea6; }
.fm-editor[data-lang="php"] { caret-color: #777bb4; }
.fm-editor[data-lang="ruby"] { caret-color: #cc342d; }
.fm-editor[data-lang="sql"] { caret-color: #336791; }
.fm-editor[data-lang="bash"] { caret-color: #4eaa25; }
.fm-editor[data-lang="markdown"] { caret-color: #083fa1; }

/* ═══════════════════════════════════════════════════════════════
   VERSION SYSTEM — CSS injected by filemanager.js (_injectVersionCSS)
   ═══════════════════════════════════════════════════════════════ */

/* Version banner + split view CSS injected by filemanager.js */

/* WorkRoom Fullscreen Mode */
.wr-fullscreen .main-content {
  grid-template-columns: 1fr !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  height: calc(100vh - 104px) !important; /* topbar(60) + bottom-bar(44) */
  min-height: 0 !important;
}
.wr-fullscreen #sidePanel {
  display: none !important;
}
.wr-fullscreen .main-left {
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  height: 100% !important;
  min-height: 0 !important;
  flex-shrink: 1 !important;
}
