*{box-sizing:border-box;margin:0;padding:0}:root{--primary-color: #0dbd8b;--primary-hover: #0aa87b;--secondary-color: #6c757d;--secondary-hover: #5a6268;--background: #f8f9fa;--surface: #ffffff;--text: #212529;--text-muted: #6c757d;--border: #dee2e6;--error: #dc3545;--cell-width: 100px;--cell-height: 28px;--header-bg: #e9ecef}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,sans-serif;background-color:var(--background);color:var(--text);line-height:1.5}.btn-primary{background-color:var(--primary-color);color:#fff;border:none;padding:10px 20px;border-radius:6px;cursor:pointer;font-size:14px;font-weight:500;transition:background-color .2s}.btn-primary:hover:not(:disabled){background-color:var(--primary-hover)}.btn-primary:disabled{opacity:.6;cursor:not-allowed}.btn-secondary{background-color:var(--secondary-color);color:#fff;border:none;padding:8px 16px;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500;transition:background-color .2s}.btn-secondary:hover:not(:disabled){background-color:var(--secondary-hover)}.btn-link{background:none;border:none;color:var(--primary-color);cursor:pointer;font-size:14px;text-decoration:underline}.btn-link:hover{color:var(--primary-hover)}input[type=text]{padding:10px 12px;border:1px solid var(--border);border-radius:6px;font-size:14px;width:100%;outline:none;transition:border-color .2s}input[type=text]:focus{border-color:var(--primary-color)}input[type=text]:disabled{background-color:var(--background)}label{display:block;font-size:14px;font-weight:500;margin-bottom:6px;color:var(--text)}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;gap:16px}.loading-spinner{width:40px;height:40px;border:3px solid var(--border);border-top-color:var(--primary-color);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;gap:16px}.error-text{color:var(--error);font-size:14px}.login-container{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:20px}.login-card{background:var(--surface);padding:40px;border-radius:12px;box-shadow:0 4px 6px #0000001a;width:100%;max-width:400px}.login-card h1{text-align:center;margin-bottom:8px;color:var(--text)}.login-subtitle{text-align:center;color:var(--text-muted);margin-bottom:32px}.login-form{display:flex;flex-direction:column;gap:16px}.input-group{display:flex;gap:8px}.input-group input{flex:1}.login-info{margin-top:24px;text-align:center;font-size:13px;color:var(--text-muted)}.login-info a{color:var(--primary-color)}.spreadsheet-selector-container{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:20px}.spreadsheet-selector-card{background:var(--surface);padding:32px;border-radius:12px;box-shadow:0 4px 6px #0000001a;width:100%;max-width:480px}.spreadsheet-selector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.spreadsheet-selector-header h1{font-size:24px}.user-info{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--text-muted)}.btn-create{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px 20px;background:var(--primary-color);color:#fff;border:none;border-radius:8px;font-size:15px;font-weight:500;cursor:pointer;transition:background-color .2s;margin-bottom:20px}.btn-create:hover{background:var(--primary-hover)}.plus-icon{font-size:20px;font-weight:300}.create-form{display:flex;flex-direction:column;gap:12px;margin-bottom:20px;padding:16px;background:var(--background);border-radius:8px}.create-form-buttons{display:flex;gap:8px;justify-content:flex-end}.spreadsheet-list{display:flex;flex-direction:column;gap:4px}.spreadsheet-item{display:flex;align-items:center;gap:12px;width:100%;padding:12px;background:none;border:none;border-radius:8px;cursor:pointer;text-align:left;transition:background-color .15s}.spreadsheet-item:hover{background:var(--background)}.spreadsheet-item-icon{font-size:24px;flex-shrink:0}.spreadsheet-item-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.spreadsheet-item-title-row{display:flex;align-items:center;gap:8px}.spreadsheet-item-title{font-size:15px;font-weight:500;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shared-badge{font-size:11px;font-weight:500;color:var(--primary-color);background:#0dbd8b1a;padding:2px 6px;border-radius:4px;flex-shrink:0}.spreadsheet-item-date{font-size:13px;color:var(--text-muted)}.empty-state{text-align:center;padding:32px 16px;color:var(--text-muted)}.empty-state p{margin-bottom:4px}.empty-state-hint{font-size:13px}.loading-inline{display:flex;flex-direction:column;align-items:center;padding:40px;gap:16px}.spreadsheet-container{display:flex;flex-direction:column;height:100vh;overflow:hidden}.spreadsheet-header{display:flex;align-items:center;padding:12px 20px;background:var(--surface);border-bottom:1px solid var(--border);gap:20px}.spreadsheet-header h2{flex:1;font-size:16px;font-weight:500;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spreadsheet-actions{display:flex;gap:8px}.spreadsheet-grid-wrapper{flex:1;overflow:auto;background:var(--surface)}.spreadsheet-grid{display:inline-block;min-width:100%}.grid-row{display:flex}.header-row{position:sticky;top:0;z-index:10;background:var(--header-bg)}.cell{width:var(--cell-width);height:var(--cell-height);min-width:var(--cell-width);min-height:var(--cell-height);border-right:1px solid var(--border);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 6px;font-size:13px;overflow:hidden;cursor:cell;outline:none}.cell:first-child{border-left:1px solid var(--border)}.header-row .cell:first-child{border-top:1px solid var(--border)}.cell.selected{outline:2px solid var(--primary-color);outline-offset:-2px;z-index:1}.cell.editing{padding:0}.cell input{width:100%;height:100%;border:none;padding:0 6px;font-size:13px;outline:none;background:#fff}.cell-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.corner-cell{background:var(--header-bg);width:50px;min-width:50px;border-top:1px solid var(--border)}.header-cell{background:var(--header-bg);font-weight:600;justify-content:center;color:var(--text-muted);border-top:1px solid var(--border)}.row-header-cell{background:var(--header-bg);font-weight:500;justify-content:center;color:var(--text-muted);width:50px;min-width:50px;position:sticky;left:0;z-index:5}.sub-spreadsheets-section{border-top:1px solid var(--border);background:var(--surface);padding:16px 20px;max-height:300px;overflow-y:auto;flex-shrink:0}.sub-spreadsheets-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.sub-spreadsheets-header h3{font-size:14px;font-weight:600;color:var(--text);margin:0}.dialog-backdrop{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:100;padding:20px}.dialog-card{background:var(--surface);border-radius:12px;box-shadow:0 8px 32px #0003;width:100%;max-width:400px;max-height:90vh;overflow-y:auto}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--border)}.dialog-header h3{font-size:18px;font-weight:600}.dialog-close{background:none;border:none;font-size:24px;cursor:pointer;color:var(--text-muted);line-height:1;padding:4px}.dialog-close:hover{color:var(--text)}.dialog-body{padding:20px;display:flex;flex-direction:column;gap:16px}.dialog-footer{display:flex;justify-content:flex-end;gap:8px;padding:16px 20px;border-top:1px solid var(--border)}.form-group{display:flex;flex-direction:column;gap:6px}.access-level-options{display:flex;flex-direction:column;gap:8px}.access-option{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;cursor:pointer;transition:border-color .15s,background-color .15s}.access-option:hover{background:var(--background)}.access-option:has(input:checked){border-color:var(--primary-color);background:#0dbd8b0d}.access-option input[type=radio]{margin-top:2px;accent-color:var(--primary-color)}.access-option-label{display:flex;flex-direction:column;gap:2px}.access-option-label strong{font-size:14px}.access-option-desc{font-size:12px;color:var(--text-muted)}.manage-access-dialog{max-width:480px}.empty-members{text-align:center;color:var(--text-muted);padding:20px 0}.member-list{list-style:none;display:flex;flex-direction:column;gap:8px}.member-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:var(--background);border-radius:8px}.member-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.member-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-id{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.member-actions select{padding:6px 8px;border:1px solid var(--border);border-radius:4px;font-size:13px;background:var(--surface);cursor:pointer}.btn-remove{padding:6px 10px;background:none;border:1px solid var(--error);color:var(--error);border-radius:4px;font-size:13px;cursor:pointer;transition:background-color .15s}.btn-remove:hover:not(:disabled){background:#dc35451a}.btn-remove:disabled{opacity:.5;cursor:not-allowed}.owner-badge{font-size:12px;font-weight:500;color:var(--text-muted);background:var(--border);padding:4px 8px;border-radius:4px}@media(max-width:600px){.login-card,.spreadsheet-selector-card{padding:24px}.spreadsheet-selector-header{flex-direction:column;gap:12px;align-items:flex-start}.spreadsheet-header{flex-wrap:wrap}.spreadsheet-header h2{order:-1;width:100%;flex:none;margin-bottom:8px}}.btn-ai-suggest{background-color:#7c3aed;color:#fff;border:none;padding:8px 16px;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500;transition:background-color .2s}.btn-ai-suggest:hover:not(:disabled){background-color:#6d28d9}.btn-ai-suggest:disabled{opacity:.6;cursor:not-allowed}.ai-suggestion-bar{display:flex;align-items:center;gap:12px;padding:8px 20px;background:#7c3aed0f;border-bottom:1px solid rgba(124,58,237,.3);font-size:13px;color:#7c3aed;font-weight:500}.ai-suggestion-bar .btn-primary,.ai-suggestion-bar .btn-secondary{padding:4px 12px;font-size:12px}.ai-error-bar{display:flex;align-items:center;gap:12px;padding:8px 20px;background:#dc35450f;border-bottom:1px solid rgba(220,53,69,.2);font-size:13px}.cell.has-suggestion{background-color:#7c3aed0f}.cell-suggestion{display:flex;align-items:center;width:100%;gap:2px}.cell-suggestion-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7c3aed;font-style:italic;opacity:.8}.cell-suggestion-accept{background:none;border:none;color:var(--primary-color);cursor:pointer;font-size:14px;padding:0 2px;flex-shrink:0;line-height:1;opacity:0;transition:opacity .15s}.cell.has-suggestion:hover .cell-suggestion-accept{opacity:1}
