*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --bg: #ffffff; --header-bg: #f0f0f0; --border: #d0d0d0; --selected-bg: #d4e6f9; --selected-border: #2266cc; --text: #222; --row-num-bg: #f5f5f5; --row-num-width: 50px; --toolbar-height: 36px; --status-height: 24px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 13px; } html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); } #app { display: flex; flex-direction: column; height: 100vh; } /* Toolbar / formula bar */ #toolbar { display: flex; align-items: center; height: var(--toolbar-height); border-bottom: 1px solid var(--border); background: var(--header-bg); padding: 0 4px; flex-shrink: 0; } #cell-ref { width: 80px; text-align: center; font-weight: 600; border-right: 1px solid var(--border); padding: 0 8px; line-height: var(--toolbar-height); flex-shrink: 0; font-size: 12px; color: #555; } #formula-bar { flex: 1; border: none; outline: none; padding: 4px 8px; font-size: 13px; font-family: inherit; background: var(--bg); height: 100%; } #formula-bar:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--selected-border); } /* Table container */ #table-container { flex: 1; overflow: auto; position: relative; } #csv-table { border-collapse: collapse; table-layout: fixed; min-width: 100%; } /* Header row */ #table-head th { position: sticky; top: 0; z-index: 10; background: var(--header-bg); border: 1px solid var(--border); border-top: none; padding: 4px 6px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; cursor: default; height: 26px; font-size: 12px; max-width: 150px; } #table-head th.row-number-header { width: var(--row-num-width); min-width: var(--row-num-width); max-width: var(--row-num-width); position: sticky; left: 0; z-index: 11; text-align: center; background: var(--header-bg); } /* Column resize handle */ .col-resize-handle { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 4; } .col-resize-handle:hover, .col-resize-handle.active { background: var(--selected-border); opacity: 0.3; } th .header-content { display: flex; align-items: center; position: relative; overflow: hidden; text-overflow: ellipsis; } th .header-text { flex: 1; overflow: hidden; text-overflow: ellipsis; } th .header-edit-input { width: 100%; border: 1px solid var(--selected-border); outline: none; padding: 1px 4px; font-size: 12px; font-weight: 600; font-family: inherit; } /* Data cells */ #table-body td { border: 1px solid var(--border); padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 24px; cursor: cell; font-size: 13px; max-width: 150px; } #table-body td.row-number { position: sticky; left: 0; z-index: 1; background: var(--row-num-bg); text-align: center; font-size: 11px; color: #888; width: var(--row-num-width); min-width: var(--row-num-width); max-width: var(--row-num-width); cursor: default; user-select: none; } /* Selection */ td.selected { background: var(--selected-bg) !important; } td.cursor-cell { outline: 2px solid var(--selected-border); outline-offset: -1px; } /* Status bar */ #status-bar { height: var(--status-height); line-height: var(--status-height); border-top: 1px solid var(--border); padding: 0 12px; background: var(--header-bg); font-size: 11px; color: #666; flex-shrink: 0; } /* Command Palette */ #overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 99; } #overlay.hidden, #command-palette.hidden { display: none; } #command-palette { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); width: 460px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); z-index: 100; overflow: hidden; } #command-input { width: 100%; border: none; border-bottom: 1px solid var(--border); padding: 12px 16px; font-size: 15px; outline: none; font-family: inherit; } #command-list { max-height: 300px; overflow-y: auto; } .command-item { padding: 8px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; } .command-item:hover, .command-item.active { background: var(--selected-bg); } .command-item .cmd-name { font-size: 14px; } .command-item .cmd-shortcut { font-size: 11px; color: #888; background: #eee; padding: 2px 6px; border-radius: 3px; } /* Drag over style */ #table-container.drag-over { background: var(--selected-bg); }